[フレーム]
Docs Pricing
Login Book a meeting Try Redis

GETEX

Syntax
GETEX key [EX seconds | PX milliseconds | EXAT unix-time-seconds |
 PXAT unix-time-milliseconds | PERSIST]
Available since:
Redis Open Source 6.2.0
Time complexity:
O(1)
ACL categories:
@write, @string, @fast,
Compatibility:
Redis Enterprise and Redis Cloud compatibility

Get the value of key and optionally set its expiration. GETEX is similar to GET, but is a write command with additional options.

Options

The GETEX command supports a set of options that modify its behavior:

Examples

SET mykey "Hello" GETEX mykey TTL mykey GETEX mykey EX 60 TTL mykey

Redis Enterprise and Redis Cloud compatibility

Redis
Enterprise
Redis
Cloud
Notes
✅ Standard
✅ Active-Active*
✅ Standard
✅ Active-Active*
*Not supported for HyperLogLog.

Return information

Bulk string reply: the value of key Nil reply: if key does not exist.
RATE THIS PAGE
Back to top ↑

AltStyle によって変換されたページ (->オリジナル) /