Here's my problem today. I am using a dict() to implement a quick and dirty in-memory cache.
I am stopping adding elements when I am reaching 1000 elements (totally arbitrary number), but I would like to have something slightly more sophisticated to free up space for newer and potentially more relevant entries.
I am thinking of the Least Recently Used principle, but how to implement that is not immediate. Before I embark on reinventing the wheel, is there a tool, library or smart trick that will allow me to remove elements with LRU logic?
thanks Dino -- https://mail.python.org/mailman/listinfo/python-list