Help with expiry and item life times

Ivan Krstic krstic at
Fri Apr 28 17:51:00 UTC 2006

Stephen Woodbridge wrote:
> 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

LRU deletion when the memory given to memcached is full and new items
need to be stored.

> 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

No, you can only flush the entire cache.

> 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?

This is the default mode of operation; you have to explicitly tell
memcached to behave otherwise to disable the LRU deletion behavior.

Ivan Krstic <krstic at> | GPG: 0x147C722D

More information about the memcached mailing list