Yo,
In general we don't recommend using timestamps for short TTL's. They were
really meant for dates far off in the future (months, where the accuracy
wouldn't matter too much). There're zero use cases for TIMESTAMP + TTL
where ttl is short. simply stop adding time() to it, or run it through a
function to convert if the requested TTL is huge.
That said, your problem isn't specifically "VM's" or not VM's, it's that
your VM sucks at keeping time!
memcached uses a monotonic clock; which will only ever go forward. This
ensures that if the system clock bounces backwards that an item doesn't
end up becoming immortal due to underflow.
Even on a good system the monotonic clock will drift over a long period of
uptime, usually after a few months. Just by a couple seconds. CPU's with
buggier clocks could shift by minutes I guess. Or in this case VM's.
There isn't too much that could be done about this simply, which is why we
highly recommend people stick to relative TTL's. If I could remove the
date feature I would, but we can't for backwards compatibility reasons.
> --
>
> ---
> You received this message because you are subscribed to the Google Groups "memcached" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
memcached+...@googlegroups.com.
> To view this discussion on the web visit
https://groups.google.com/d/msgid/memcached/72771e82-79aa-4b23-9563-1b4099930e68%40googlegroups.com.
>
>