pexpireat
PEXPIREAT Unix milliseconds-timestamp
지정된 시간(Unix milliseconds-timestamp) 후 key 자동 삭제
사용법은 pexpireat key milliseconds-timestamp [type] 이다.
📍 type은 string/list/set/zset/hash/stream 중 하나입니다. 
       ent811부터 type이 추가되었습니다. 꼭 사용하시기 바랍니다. 
Example
| 명령> | set key value | 
| 결과> | 1 | 
| 명령> | pexpireat key 1534059795141 string | 
| 결과> | 1 | 
| 명령> | pttl key string | 
| 결과> | 3546 | 
| 명령> | pttl key string | 
| 결과> | -2 | 
| 명령> | get key | 
| 결과> | (nil) | 
 
 
set 명령으로 겹쳐써지면 expire time 제거
expire time 이 설정된 후 같은 key에 set 명령이 수행되면 expire time이 제거되어 지워지지 않는다.
이런 명령은 set, getset 이 있다.
incr, lpush, sadd, zadd, hset 같은 명령은 해당되지 않는다.
Example
| 명령> | set key value | 
| 결과> | 1 | 
| 명령> | pexpireat key 1534059795141 string | 
| 결과> | 1 | 
| 명령> | pttl key string | 
| 결과> | 3 | 
| 명령> | set key new_value | 
| 결과> | 1 | 
| 명령> | pttl key string | 
| 결과> | -1 | 
| 명령> | get key | 
| 결과> | new_value | 
 
 
rename은 expire time이 제거되지 않음
key name을 바꾸어도 expire time은 제거되지 않는다.
Example
| 명령> | set key value | 
| 결과> | 1 | 
| 명령> | pexpireat key 1534059795141 string | 
| 결과> | 1 | 
| 명령> | rename key new_key string | 
| 결과> | OK | 
| 명령> | pttl key string | 
| 결과> | -2 | 
| 명령> | get key | 
| 결과> | (nil) | 
 
 
명령문
PEXPIREAT key milliseconds-timestamp [type]
- 이 명령은 version 2.6.0 부터 사용할 수 있다.
- 논리적 처리 소요시간은 O(1)이다. 
- ent811 type 추가.