memcached expiration time

前端 未结 8 1994
面向向阳花
面向向阳花 2020-12-29 08:46

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

8条回答
  •  北荒
    北荒 (楼主)
    2020-12-29 09:49

    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.

提交回复
热议问题