4 ms·
You can configure a redis DB using the maxmemory flag instead of setting expiries, so yes it can be used as an LRU cache. Probably not as fast as memcached, bu
by rapind 16y ago
You can configure a redis DB using the maxmemory flag instead of setting expiries, so yes it can be used as an LRU cache.
Probably not as fast as memcached, but one situation where it would be appropriate is if you're already using redis in your stack for something else (fast writes). Rather than adding another piece of complexity to your stack you can instead get double use out of redis as a cache as well.
See: http://antirez.com/post/redis-as-LRU-cache.html http://antirez.com/post/redis-as-LRU-cache.html
- mfenniak 16y agoMy mistake, I was not aware of those configuration options. Thanks for the correction.
- rapind 16y agoWell in your defence, I don't think they're in the current stable release, but rather the 2.2 branch (RC).
- andrewvc 16y agoExcept that algorithm isn't lru
- jamwt 16y agoIt is in 2.2. Check out: maxmemory-policy allkeys-lru How do I know? We ( http://bu.mp http://bu.mp ) push 100s of GB though redis every day in LRU mode.