开发者

What Does Memcached's LRU Actually Mean?

Memcached says it uses an LRU queue to do eviction (with a few rules based around slab sizes mixed in.) When they say least-recently-used, are they referring to least recently stored or least recently read? Their documentation see开发者_如何转开发ms ambiguous here.


Everywhere I've seen the term used, LRU has referred to the last access (read or write) rather than the last store.

This article confirms it:

The LRU algorithm ensures that the object that is removed is one that is either no longer in active use or that was used so long ago that it’s data is potentially out of date or of little value.

It goes on to talk about items which are in "active use" - which to me strongly implies that it's access rather than storage... you wouldn't talk about something "actively being stored" unless you're halfway through actually writing it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜