Upstash · Method
redis.getset
GETSET replaces a key's string value and returns its old value atomically. It returns null for a missing key, but removes any existing expiration.
Last updated
Syntax
GETSET <key> <value>In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
GETSETGETDELGETEXINCRINCRBY