4 ms·
If anyone is looking at this stuff and thinking it’s intimidating then think again: Redis is mostly a lot of fuss around a hash map. There are cool features sur
by cormacrelf 4y ago
If anyone is looking at this stuff and thinking it’s intimidating then think again: Redis is mostly a lot of fuss around a hash map. There are cool features sure but the idea is mainly “what if a hash map were accessible from two or more servers”. If you only have one or two servers, you only want a cache, and you don’t anticipate scaling up soon (be honest) you can just use a hash map with expiry checking and not have to learn how to deploy another piece of software.
- HideousKojima 4y agoAnd some languages will even have this built in to the standard library, like C#'s MemoryCache class.
- cormacrelf 4y agoIIRC there’s a nice abstraction in .NET Core for caching, which has a swappable backend that means you can upgrade from MemoryCache to Redis if you ever need it. If only all software was this good. One of the least-leaky abstractions of all time.
- tayo42 4y agoRedis offeres alot more then just a key value store. The fuss is the data structures it provides. And just using a hash map in memory isn't sufficient. You'll have unbounded growth. You need a max size and need to evict. Then you want to do that efficiently so your not wasting space on useless keys...