v0.7.0

TTL、EXPIRE、EXPIREAT 與 PERSIST

最後更新

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

過期

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

相關頁面

EN