valkey
valkey copied to clipboard
[NEW] Add support for expiry of fields in hash key
The problem/use-case that the feature addresses
There are many cases one would like to have volatile cache entries but also grouped under a hash table. The popular way to workaround it today is to set a timestamp to the hashed value, and manually calculate the expiry. This is a long asked feature for redis, and redis started the support of it starting 7.4, and forks of it such as KeyDB has supported years ago.
Description of the feature
Allow similar expiry that one would set to a key to the hash key(fields)
Alternatives you've considered
We currently just carry the timestamp within the value of the key, but obviously this is subject to race and issues like time drift among the clients.
Additional information
N/A