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.