3 ms·
I think the solutions to this problem are: - If the keys are strings, just use a single hashmap and you're done. - If the keys have different types, then you
by kristoff_it 5y ago
I think the solutions to this problem are:
- If the keys are strings, just use a single hashmap and you're done.
- If the keys have different types, then you need a Redis module that implements something like `MPEXPIREAT time key1 key2 ...` and then you need to either be able to handle the case where you successfully retrieve key1 but not key2 (because they expired half-way through) or you use a lua script to execute the multi-key access atomically. That said, without the lua script the whole point of having the keys expire at the same time makes less sense, IMO.