ARNEXT

ARNEXT key
Available since:
Redis Open Source 8.8.0
Time complexity:
O(1)
ACL categories:
@read, @array, @fast,
Compatibility:
Redis Software and Redis Cloud compatibility

Returns the next index ARINSERT would use.

Required arguments

key

The name of the key that holds the array.

Examples

ARINSERT myarray "a" ARINSERT myarray "b" ARNEXT myarray

Redis Software and Redis Cloud compatibility

Redis
Software
Redis
Cloud
Notes
❌ Standard
❌ Active-Active
❌ Standard
❌ Active-Active

Return information

One of the following:

  • Integer reply: The next index ARINSERT would use. Returns 0 for missing keys or when no insert happened yet.
  • Nil reply: Null when the insertion cursor is exhausted (next insert would overflow).
RATE THIS PAGE
Back to top ↑