which items get expired when cache is full?

2 views
Skip to first unread message

Bennett Haselton

unread,
Jul 1, 2009, 7:13:26 PM7/1/09
to memcached
I couldn't find this in
http://code.google.com/p/memcached/wiki/FAQ
but maybe I missed it: When the cache is full and you attempt to store
more items, what happens? Will the least-recently-used items get
deleted from the cache (even if they haven't been expired yet), or
some sort of pseudo-LRU that makes a best guess at expiring the least-
recently-used item even if it's not 100% accurate?

Someone added a comment at the bottom of
http://code.google.com/p/memcached/wiki/FAQ
asking the same thing.

Bennett

Dustin

unread,
Jul 1, 2009, 7:18:41 PM7/1/09
to memcached

On Jul 1, 4:13 pm, Bennett Haselton <benn...@peacefire.org> wrote:
> I couldn't find this inhttp://code.google.com/p/memcached/wiki/FAQ
> but maybe I missed it: When the cache is full and you attempt to store
> more items, what happens?  Will the least-recently-used items get
> deleted from the cache (even if they haven't been expired yet), or
> some sort of pseudo-LRU that makes a best guess at expiring the least-
> recently-used item even if it's not 100% accurate?
>
> Someone added a comment at the bottom ofhttp://code.google.com/p/memcached/wiki/FAQ
> asking the same thing.

*approximately* the oldest for a given slab. It is not 100%
accurate (and I'm hoping to make it less accurate in at least an
experimental engine at some point).

There are a few things it does already to sacrifice accuracy with
efficiency.

Bennett Haselton

unread,
Jul 1, 2009, 7:24:28 PM7/1/09
to memc...@googlegroups.com
Oh OK I see it now:
http://code.google.com/p/memcached/wiki/FAQ#What_is_memcached's_cache?
I didn't know that's what the question meant, that's how I missed it :)
Reply all
Reply to author
Forward
0 new messages