Florian Lindner <Florian.Lindner at xgm.de> writes: > What possible you see to optimize this lookup? Or anything else you see to > make it better? Do you need to update the timestamp of cached entries when you access them? If yes, use the heapq module. If no, is the cache something different from a simple FIFO?