Skip to main content

Set Cache Value

  • Stores a value in cache
  • Optional TTL for expiration
  • Overwrites existing values

Get Cache Value

  • Retrieves stored value
  • Returns null if key doesn’t exist

Has Cache Value

  • Checks if key exists in cache
  • Returns boolean

Delete Cache Value

  • Removes key and value from cache
  • No effect if key doesn’t exist

Increment Cache Value

  • Increments numeric value
  • Creates key with value 0 if doesn’t exist

Decrement Cache Value

  • Decrements numeric value
  • Creates key with value 0 if doesn’t exist

Get Cache Keys

  • Returns array of matching keys

Add To End of List

  • 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

  • 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

  • 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

  • Removes and returns first element
  • Returns null if list is empty
  • Reduces list length by 1
  • Common for queue operations

Remove From List

  • 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

  • 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

  • Returns range of list elements
  • -1 means last element
  • Supports negative indices
  • Inclusive of start and stop indices

Rate Limit

  • Implements rate limiting
  • Tracks attempts within time window
  • Returns current limit status
  • Throws error when limit exceeded