I
I
Ivan2014-06-11 11:52:59
memcached
Ivan, 2014-06-11 11:52:59

Memcached returns expired values

1. Put a key in memcached with a lifetime of 15 minutes. The key is tied to the user (this is the flag of his activity on the site), that is, for someone it may not exist at all.
2. It is expected that 15 minutes after the user leaves memcached, the key will not be given (because it will expire). However, he gives up. Since we only check for the presence of the key itself in the cache (we will not discuss what can be done better and more reliably), the handler assumes that the user is still online.
3. I check the presence of a key in memcached via get - it really is given. I look at it through stats cachedump - it lies in the cache with an expired timestamp (something like ITEM user_visit_site_at_xxxx [10 b; 1387775909 s] ). Of course, the key with expires=1387775909 (12/23/2013) should not be given by get.
As a matter of fact, the question is - has anyone come across this? How did they win? Memcached v1.4.15, running on centos. Google only gave me something like grokbase.com/t/gg/memcached/141q2s1g80/certain-ite... but there is no answer there.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question