开发者

memcache - how to make some data less likely to get evacuated

I have a server with memcache (v1.4.4) in which there are small chunks of data which I need to stay for long time (lets say 24 hours). and larger chunks of data which I want to get evacuated if the memory开发者_如何学运维 gets filled up.

How can I determine that a piece of data is more important (and therefore should not be evacuated) while other pieces of data are to be evacuated?


This sounds like a good argument to use a different memcache server for the data. You have 1 set of memcache servers for data that can vanish. And another memcache server for data YOU REALLY don't want to risk losing though LRU. The 2nd memcache server is closely monitored for evictions. However, memcache when full, will toss data. So, not really the solution you need.

Redis, I believe will not throw stuff out.


Access it more frequently than other items in your cache.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜