memcached not expiring keys; Re:

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


There's no cleanup process because one isn't needed:  it's self-cleaning!

If an item is hot and expired, it gets deleted.  If an item is cold and
expired, it falls off and is deleted.

- Brad


On Mon, 2 May 2005, eon wrote:

> Hmm... so there is no "clean up" process?  In other words,
> if an item is expired, it will sit in the cache and then
> when called upon again (since it is expired) it will simply
> be refreshed?
>
> That makes enough sense, just makes it a little harder on us
> folks who are working with tighter hardware constraints.  =\
>
> eon
>
> ----- Original Message -----
> From: "Brad Fitzpatrick" <brad at danga.com>
> To: <e.sol at verizon.net>
> Sent: Monday, May 02, 2005 4:11 PM
> Subject: memcached not expiring keys; Re:
>
>
> > 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