What is the default ttl of a key in memcached bucket?

Also, what happens when a bucket is full?

I created a 256MB RAM Bucket and tried to overload it by sending infinite set queries till error is thrown. But to my surprise, it keep accepting inputs, but total items now fixed to 2.8M with 204M RAM used.

Meanwhile, when I tried to fetch the first key it says key not found. Moreover, I keep calling a specific key infinitely it doesnt get expired.

So how is it exactly working? Please guide.

  • this might help a bit.
    – Vatev
    Commented Jul 29, 2014 at 10:04

1 Answer 1


If you do not set a TTL, the object will never expire.

The latter part of your questions sounds like you are running into memcached's cache eviction strategy where it will throw out of the objects that have least recently been used (LRU) to make room for newer items.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.