4 ms·
I don't know why people use redis as an LRU cache. Its a terrible LRU cache. Its eviction algorithm isn't true LRU and does sampling which may cause new keys
by adrr 10y ago
I don't know why people use redis as an LRU cache. Its a terrible LRU cache. Its eviction algorithm isn't true LRU and does sampling which may cause new keys to get incorrectly convicted. LRU is also really slow being single threaded.
- zaius 10y agoWhat should people use?
- adrr 10y agoMemcached is a LRU cache.
- eriknstr 10y agoI went and searched for memcached redis because up until now I haven't gotten around to checking out the differences. Here are some things I found. http://antirez.com/news/94 http://antirez.com/news/94 http://stackoverflow.com/questions/10558465/memcached-vs-redis http://stackoverflow.com/questions/10558465/memcached-vs-red... http://www.infoworld.com/article/3063161/application-development/why-redis-beats-memcached-for-caching.html http://www.infoworld.com/article/3063161/application-develop...
- aphextron 10y agouse Redis when you need advanced data structures built in. Memcached is just a KV store.
- twblalock 10y agoA lot of uses of Redis are suboptimal, but easy to set up and good enough. For example, "true" LRU is not always needed -- an approximation of LRU is sometimes sufficient. It's often not worth the time and money to do better. When you need to scale past what Redis can provide, you can move on to a different solution, as Github has done.
- ec109685 10y agoWhy does single threaded make it slow? Also, 3.0 has a better LRU algorithm. https://redis.io/topics/lru-cache https://redis.io/topics/lru-cache