sorentwo / readthis

:newspaper: Pooled active support compliant caching with redis
MIT License
504 stars 40 forks source link

Support for maxmemory and LRU #31

Closed dmitrypol closed 8 years ago

dmitrypol commented 8 years ago

Came across this issue in http://stackoverflow.com/questions/17537795/rails-redis-setting-maxmemory-and-maxmemory-policy. I was wondering if there is a way set max values and LRU policy for specific caching keys? Could be useful in some situations.

sorentwo commented 8 years ago

Sorry, there isn't any way to configure memory and eviction policies on a per-key basis. In fact, you can't even configure them for individual databases--only at the Redis instance level.

I recommend breaking persistent and ephemeral data into separate instances when possible.

http://sorentwo.com/2015/07/27/optimizing-redis-usage-for-caching.html