For those interested, I have been working on a map that allows for size and item’s age constraints, still under construction tho https://github.com/perrito666/constrainediterable/blob/master/map.go #golang more tests are to be added and a way to trigger eviction.