ARSET
ARSET key index value [value ...]
- Available since:
- Redis Open Source 8.8.0
- Time complexity:
- O(N) where N is the number of values
- ACL categories:
-
ARRAY,
Sets one or more contiguous values starting at an index in an array.
Required arguments
key
The name of the key that holds the array.
index
The zero-based integer index at which to start writing. When multiple values are provided, they are stored at consecutive indices starting from index.
value
One or more string values to store at consecutive indices beginning at index. The number of new (previously empty) slots filled is returned.
Examples
Return information
Integer reply: Number of new slots that were set (previously empty).