Redis Persist command - Lệnh xóa thiết lập thời gian hết hạn của Key trong Redis

Redis Persist command được sử dụng để xóa một thiết lập expire của key.

Return value:

Integer value:

Syntax:

redis 127.0.0.1:6379> PERSIST KEY_NAME

Ví dụ:

redis 127.0.0.1:6379> SET tutorial1 redis
OK

redis 127.0.0.1:6379> EXPIRE tutorial1 60
1) (integer) 1
redis 127.0.0.1:6379> TTL tutorial1
1) (integer) 60
redis 127.0.0.1:6379> PERSIST tutorial1
1) (integer) 1
redis 127.0.0.1:6379> TTL tutorial1
1) (integer) -1

Revision #2
Created 13 October 2019 04:16:24 by Laptrinh.vn
Updated 11 April 2020 15:19:36 by Laptrinh.vn