When you set a key to expire in memcached does it actually get deleted when the expiration is up, or does it get deleted once the key is requested (get) and expiration has expired. In other words, does expiration automatically delete the value from memcached, or simply flag it as expired?
Thanks.
Expiration is lazy. If you do a get on an expired key it is deleted. Otherwise it is flagged and when you run out of space in your cache it will be removed to make room for a new item.