在.NET-Core 項目中使用了Memcached 用來緩存,在windows 也安裝了相應的客戶端。用CMD 使用 telnet localhost 11211 進入Memcached 進行操作。問題是這樣的,我使用 stats items列出了所有了所有的key值然后使用 stats cachedump key 1000 來列出這個緩存的Key 值如下圖所示這些都沒問題,問題出在我用 get key 來獲取值的時候,這個值就消失了,請問這是什么原因?
1 回答

汪汪一只貓
TA貢獻1898條經驗 獲得超8個贊
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.
- 1 回答
- 0 關注
- 574 瀏覽
添加回答
舉報
0/150
提交
取消