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#

keystrrequired#

The array key.

sizeintrequired#

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

values*values: ValueTrequired#

One or more values to write. Values may be strings, integers, floats, or booleans.

Response#

intrequired

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.