On Oct 26, 2011, at 9:49 AM, njh@bandsman.co.uk via RT wrote:
Show quoted text> Queue: CHI
> Ticket <URL:
https://rt.cpan.org/Ticket/Display.html?id=71872 >
>
> On Tue Oct 25 18:52:28 2011, swartz@pobox.com wrote:
>> It means from when it was set. I've clarified the docs for the next
>> release.
>
> Thanks for the clarification.
>>
>> Just curious, what's the application for refreshing the cache item
>> every time it is retrieved? Wouldn't that lead to arbitrarily out-
>> of-date cache items if there was a constant trickle of retrievals?
>
> I have a number of places where I'd want to retain popular items which
> hit often, and discard those that match rarely or not at all.
Ok, in that case you're talking about a size-aware cache with an LRU or similar discard strategy - see
http://search.cpan.org/perldoc?CHI#SIZE_AWARENESS
However, to be honest, this isn't CHI's strength, as implementing LRU efficiently requires close integration with the backend. Not sure what backend you are using, but Memcached and Cache::FastMmap (for example) both have their own LRU discard implementations.
Jon