Google AppEngine上的memcache会多久失去一次数据? [英] How often does memcache on Google AppEngine lose data?
问题描述
像任何缓存一样,Memcache应该用作... a cache。如果您无法在缓存中找到某些内容,则必须有策略在永久存储中找到它。
除了您提到的原因外,Memcache和其他缓存方法对它们将保存的项目数量也有限制(通常在缓存满时通常会丢弃最少使用的项目),并且通常也会设置其他缓存失效策略(例如,刷新一小时内未使用的所有内容)。
如果您不自己配置和操作缓存,则无法保证何时以及如何项目可能会故意从缓存中删除/由设计。
Memcache in general and on AppEngine in specific is unreliable in the sense that my data may be deleted from the cache for whatever reason at any point in time. However, in some cases there might be cases where a small risk may be worth the added performance using memcache could give, such as updating some data in memcache that gets saved periodically to some other, more reliable storage. Are there any numbers from Google that could give me an indication of the actual probability that a memcache entry would be lost from the cache before its expiration time, given that I keep within my quotas?
Are there any reasons other than hardware failure and administrative operations such as machines at the data centers being upgraded/moved/replaced that would cause entries to be removed from memcache prematurely?
Memcache, like any cache, should be used as... a cache. If you can't find something in the cache, there must be a strategy to find it in permanent storage.
In addition to the reasons you mention, Memcache and other caching approaches have limits to the amount of items they will hold (discarding usually the least recently used ones when the cache is full), and often also set other cache invalidation policies (e.g. flush everything unused for one hour).
If you don't configure and operate the cache yourself, you have NO guarantee of when and how items might be removed from the cache intentionally / by design.
这篇关于Google AppEngine上的memcache会多久失去一次数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!