Skip to content
masterclass Buddy

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.

Subscribe
  • GET
  • SET
  • GETDEL
  • GETEX
  • INCR
  • INCRBY

Source: GETSET - Upstash Documentation. Checked 2026-11-03.