Help with expiry and item life times

Evan Martin martine at danga.com
Fri Apr 28 18:06:43 UTC 2006


On 4/28/06, Stephen Woodbridge <woodbri at swoodbridge.com> wrote:
> I just started using memcached with applications accessing it via the
> Perl API. We really like it!
>
> I was reading the archive and there is nothing in the docs that I have
> found the explains expiry and item life times.
>
> 1) if I don't set and expiry for an item under what conditions, if any
> will if get removed from the cache other than an explicit delete operation
>
> 2) we set an expiry of 7 days for all items, but are running out of
> cache space, is there away to expire cached items early, like everything
> that is greater than 5 days old
>
> 3) is there a way to configure the memcached to automatically expire the
> oldest items or least used items to free space for newer items?

The answer to #3 answers #1 and #2 as well:
memcached, unless you specify special flags, deletes the
least-recently used keys when new data needs the memory.


More information about the memcached mailing list