v0.7.0

TTL、EXPIRE、EXPIREAT 與 PERSIST

最後更新


本頁說明 ToriiDB 讀取、設定與移除鍵過期時間的指令。

過期


  1. TTL <key>
  2. EXPIRE <key> <seconds>
  3. EXPIREAT <key> <timestamp>
  4. PERSIST <key>

指令回應規則
TTL無過期為 (integer) -1;不存在或已過期為 (nil)
EXPIRE<= 0 或非整數為 error: seconds must be a positive integer;不存在為 (nil)
EXPIREATerror: timestamp must be a valid integer;不存在為 (nil)
PERSIST不存在為 (nil)

相關頁面


EN