Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I've been looking through these modules, but have a general question. All of them allow the expirey of data (and subsequent callbacks to other data stores.) I was wondering, however, if expire times are updated on last use or are set when a cache entry is created and then expired a designated time afterwards?
Is this a specification of LRU? Could somebody, if possible, explain how these cache-ing mechanisms implement LRU algorithms?
Comment on Expire Time In Caches (Cache::Mmap, Cache::FastMmap, IPC::MM)?
IPC::MM is just a hash. It has no concept of LRU or expiration. You would have to add that. Cache::FastMmap uses an LRU algorithm to manage the cache size, so when the cache gets too big, the least recently used entries will be dropped. This is independent of expiration times. And no, the expiration times are not updated when you access things.