5 ms·
From what I know, Redis's virtual memory mode isn't bad at all. Odds are that unless you have an absurd amount of keys or have very little RAM, Redis will likel
by meowface 12y ago
From what I know, Redis's virtual memory mode isn't bad at all. Odds are that unless you have an absurd amount of keys or have very little RAM, Redis will likely be able to fit all of the keys into memory. To help with this, use short key names, and use collection data types (so one key may be able to hold hundreds or thousands of values).
I'd say experiment with Redis, with actual testing, before looking at an alternative solution. You can set a maximum memory limit in Redis's config and see what performance is like. You can also have it prune entries once the memory limit is reached.
At the scale at which Redis stores data, RAM is pretty cheap.