mirror of
https://github.com/Snailclimb/JavaGuide
synced 2025-06-20 22:17:09 +08:00
Merge pull request #1864 from liubobo1996/main
[docs fix]修正 expire 命令的使用
This commit is contained in:
commit
609a990315
@ -322,7 +322,7 @@ io-threads 4 #官网建议4核的机器建议设置为2或3个线程,8核的
|
||||
Redis 自带了给缓存数据设置过期时间的功能,比如:
|
||||
|
||||
```bash
|
||||
127.0.0.1:6379> exp key 60 # 数据在 60s 后过期
|
||||
127.0.0.1:6379> expire key 60 # 数据在 60s 后过期
|
||||
(integer) 1
|
||||
127.0.0.1:6379> setex key 60 value # 数据在 60s 后过期 (setex:[set] + [ex]pire)
|
||||
OK
|
||||
|
Loading…
x
Reference in New Issue
Block a user