首页 新闻 会员 周边

Memcached cachedump then get key error

0
悬赏园豆:20 [已解决问题] 解决于 2018-02-28 17:11

.NET-Core 项目中使用了Memcached 用来缓存,在windows 也安装了相应的客户端。

CMD 使用 telnet localhost 11211 进入Memcached 进行操作。

问题是这样的,
我使用 stats items列出了所有了所有的key

然后使用 stats cachedump key 1000 来列出这个缓存的Key
如下图所示

这些都没问题,问题出在我用 get key 来获取值的时候,这个值就消失了,请问这是什么原因?

BUTTERAPPLE的主页 BUTTERAPPLE | 老鸟四级 | 园豆:3190
提问于:2017-07-26 11:22
< >
分享
最佳答案
0

Memcached 中缓存清除的机制:

Expiration in memcached is lazy. In general, an item cannot be known to be expired until something looks at it.

If you fetch an expired item, memcached will find the item, notice that it's expired, and free its memory. This gives you the common case of normal cache churn reusing its own memory.

BUTTERAPPLE | 老鸟四级 |园豆:3190 | 2017-07-27 10:24
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册