axetroy / axetroy/stackoverflow
Redis 的 Set 和 List 无法为单独的元素设置过期时间
Open
后端开发
- Dominant language
- No language data
- Stars
- 3
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
Redis 的过期时间是针对整体,而不是单独一个元素
Set/List 随着时间的增大,而不断变大,但是元素又没有一个过期时间,这显然是不合理的
暂行的解决办法:
1.
每个元素里面设置一个过期时间,整体的 Set/List 不过期
然后开启一个专门的协程检查过期时间
2.
通过 redis 的模糊查询
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.