Set Cache Value
Example
Example
- Stores a value in cache
- Optional TTL for expiration
- Overwrites existing values
Get Cache Value
Example
Example
- Retrieves stored value
- Returns null if key doesn’t exist
Has Cache Value
Example
Example
- Checks if key exists in cache
- Returns boolean
Delete Cache Value
Example
Example
- Removes key and value from cache
- No effect if key doesn’t exist
Increment Cache Value
Example
Example
- Increments numeric value
- Creates key with value 0 if doesn’t exist
Decrement Cache Value
Example
Example
- Decrements numeric value
- Creates key with value 0 if doesn’t exist
Get Cache Keys
Example
Example
- Returns array of matching keys
Add To End of List
Example
Example
- Adds value to end of list
- Creates list if it doesn’t exist
- Returns new length of list
- Supports any data type for value
Add To Beginning of List
Example
Example
- Adds value to beginning of list
- Creates list if it doesn’t exist
- Returns new length of list
- Useful for “most recent” lists
Remove From End of List
Example
Example
- Removes and returns last element
- Returns null if list is empty
- Reduces list length by 1
- Common for stack operations
Remove From Beginning of List
Example
Example
- Removes and returns first element
- Returns null if list is empty
- Reduces list length by 1
- Common for queue operations
Remove From List
Example
Example
- Removes matching values from list
- Count=0 removes all occurrences
- Count>0 removes from head to tail
- Count<0 removes from tail to head
Get Length Of List
Example
Example
- Returns current length of list
- Returns 0 if list doesn’t exist
- Useful for queue management
- Quick operation regardless of list size
Get Elements From List
Example
Example
- Returns range of list elements
- -1 means last element
- Supports negative indices
- Inclusive of start and stop indices
Rate Limit
Example
Example
- Implements rate limiting
- Tracks attempts within time window
- Returns current limit status
- Throws error when limit exceeded