Memcached provides a cache expiration time option, which specifies how long objects are retained in the cache. Assuming all writes are through the cache I f
We have been thinking about the same and this is what is on memcached wiki "Even if you're actively deleting or overwriting cached data, you'll still want to have the cache expire occasionally. In case your app has a bug, a crash, a network blip, or some other issue where the cache could become out of sync."
This makes sense as we cannot plan for network blips and it becomes important if we are releasing code every day or 2 or week. one thought we have is to restart memcached server every release, but that will get really painful if there are 10 or more memcached servers. The simplest thing I believe is to set expiry on objects.