v0.7.0

Expiration

Last updated

This page explains how ToriiDB keys get a TTL and the points at which expired keys are removed.

Expiration

Operation Result
TTL(key) remaining seconds; -1 without expiry; -2 when missing or expired
Expire(key, seconds) ExpireAt = now + seconds
ExpireAt(key, ts) absolute timestamp
Persist(key) removes expiry

Expired keys are enforced at several points:

中文