redis hset hmset過期時間

weixin_30488085發表於2020-04-06

hmset m k v 

127.0.0.1:6379> hset m k  v
(integer) 1
127.0.0.1:6379> hget m k
"v"
127.0.0.1:6379> expire  m 30
(integer) 1
127.0.0.1:6379> ttl m
(integer) 24
127.0.0.1:6379> ttl m
(integer) 22
127.0.0.1:6379> ttl m
(integer) 21
127.0.0.1:6379> ttl m
(integer) 20
127.0.0.1:6379> ttl m
(integer) 19
127.0.0.1:6379> ttl m
(integer) 18
127.0.0.1:6379> ttl m
(integer) 17
127.0.0.1:6379> ttl m
(integer) -2

 

轉載於:https://www.cnblogs.com/lavin/p/10144311.html

相關文章