3 ms·
Systems that are used as cache such as redis evict keys with some randomness to avoid scanning all of them. They also evict keys you read that expired without y
by BiteCode_dev 3y ago
Systems that are used as cache such as redis evict keys with some randomness to avoid scanning all of them. They also evict keys you read that expired without you having to check for that. And they don't store both a key and an id.
Given the value of redis for caching and outside of caching, bur the ease and low cost of setting it up, I would say postgres as a cache seems niche.
- Rapzid 3y agoPostgres doesn't need to scan them all because it has indexes. It also has a number of random sampling strategies available. It is niche, but it's a viable option for a lot of use cases if you need to limit the number of service dependencies.