Skip to main content

ARRING

Append values to a fixed-size ring buffer.
1 min read

Writes wrap to index zero when the ring is full and overwrite the oldest values. Calling this command with a different size reshapes the ring.

Arguments#

keystringrequired#

The array key.

sizenumberrequired#

The number of slots in the ring. Must be greater than zero.

values...TData[]required#

One or more values to write.

Response#

stringrequired

The index where the last value was written, as a string in TypeScript or an integer in Python.

See the server command reference for protocol details.