Expand description
store-incr โ atomically increments a counter in a named store.
The TTL is applied when the key is created and never refreshed. A counter that bounds retries must expire a fixed time after it first appears; refreshing on every increment means a client that keeps retrying keeps the counter alive and the bound never resets.
Structsยง
Constantsยง
- INCR_
SCRIPT ๐ - INCRBY, then set the expiry only if the key does not already have one.
TTLreturns a negative value when the key has no expiry, so the guard also repairs a key that somehow lost one. One round trip, atomic.
Functionsยง
- parse_
by ๐ - Parses the optional
byamount, which defaults to 1 and may be negative. - parse_
refresh_ ๐ttl - Parses the optional
refresh_ttlflag.