Skip to content

Commit 609a990

Browse files
authored
Merge pull request Snailclimb#1864 from liubobo1996/main
[docs fix]修正 expire 命令的使用
2 parents d8f1606 + cd9c4e8 commit 609a990

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/database/redis/redis-questions-01.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ io-threads 4 #官网建议4核的机器建议设置为2或3个线程,8核的
322322
Redis 自带了给缓存数据设置过期时间的功能,比如:
323323

324324
```bash
325-
127.0.0.1:6379> exp key 60 # 数据在 60s 后过期
325+
127.0.0.1:6379> expire key 60 # 数据在 60s 后过期
326326
(integer) 1
327327
127.0.0.1:6379> setex key 60 value # 数据在 60s 后过期 (setex:[set] + [ex]pire)
328328
OK

0 commit comments

Comments
 (0)