我需要使 redis 散列中超过 1 个月的所有键过期。
最佳答案
This is not possible , 为了 keeping Redis simple .
Quoth Antirez,Redis 的创造者:
Hi, it is not possible, either use a different top-level key for that specific field, or store along with the filed another field with an expire time, fetch both, and let the application understand if it is still valid or not based on current time.
关于hash - 如何在redis中 "EXPIRE" "HSET"子键?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56965082/