memcached not expiring keys

Brad Fitzpatrick brad at danga.com
Mon May 2 14:11:42 PDT 2005


If you're basing your conclusion on looking at the stats, keep in mind
that expired keys are dropped lazily.  That is, when the item is got, its
expiration time is checked.  There is no background task throwing items
away.  They either get retrieved and thrown away for being too old, or
they just fall off the LRU list.

- Brad

On Mon, 2 May 2005, eon wrote:

> Greetings-
>
> I seem to have trouble with memcached not eliminating keys as it should.  I'm storing serialized (arrays) of data and specifying that they be held for 30 minutes.  It seems that the data is being held indefinitely.  I have no trouble manually updating or deleting the keys, it just seems that they do not expire as they should.
>
> I'm using memcahced 1.1.12 with PHP and the client at http://phpca.cytherianage.net/memcached/
>
> I'm running on Linux 2.4.x with poll (I know, you'll want me using epoll instead) and libevent 1.0e.
>
> Any ideas you might have to share would be well received.
>
> Thank you...
>
> eon


More information about the memcached mailing list