Upstash · Method
redis.expire
Sets a timeout on a Redis key in seconds. Redis deletes the key after the timeout, and the method returns 1 when the timeout is set or 0 otherwise.
Last updated
Syntax
await redis.expire(key, seconds)In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
EXPIREATPEXPIRETTLPERSIST