Redis
String API Reference
Redis String commands for storing, reading and atomically updating single values.
By EZ4Code Team
String Commands
Commands operating on Redis string values.
SET key value [EX seconds | PX ms] [NX | XX] [KEEPTTL]Sets key to value with optional expiry and existence condition flags.
Returns: OK | nil
GET keyReturns the string value stored at key, or nil if the key does not exist.
Returns: string | nil
INCR key | INCRBY key deltaAtomically increments the integer value stored at key by one or by the given delta.
Returns: integer
APPEND key valueAppends value to the string at key, creating it if it does not exist. Returns the new length.
Returns: integer
EXPIRE key seconds [NX | XX | GT | LT]Sets a time-to-live in seconds on a key, with optional condition flags.
Returns: 0 | 1