hash - 如何在redis中 "EXPIRE" "HSET"子键?

标签 hash redis

我需要使 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/

相关文章:

shell - 创建 shell 脚本来遍历文件系统并对每个文件进行哈希处理

带斜线的 Laravel 哈希

laravel - 如何实现 Laravel Redis 速率限制

ruby - EventMachine、Redis 和 EM HTTP 请求

redis - 在 Redis 中,如何在多个排序集合中获得最高分?

data-structures - Redis 数据结构存储所有链接的所有点击

ruby-on-rails - 为 ruby​​ 设置 Redis 时遇到问题

javascript - window.location.hash 包含点/句点的奇怪行为

c++ - "congruent hash"与 "identity hash"是否有标准名称/模板原型(prototype)?

php - 散列 "remember me"cookie token 的最佳方法