Méthode |
Description |
|
Append ( string $key, string $value ) : integer |
Append a value to a key |
|
Auth ( string $password ) : boolean |
Request for authentication in a password protected Redis server. |
|
BITCOUNT ( $key, integer $start, integer $end ) : integer |
Count the number of set bits (population counting) in a string. |
|
BITOP ( string $operation, string $destkey, string $key ) : integer |
Perform a bitwise operation between multiple keys (containing string values) and store the result in the destination key. |
|
BLPop ( string | array $key, integer $timeout ) |
Remove and get the first element in a list, or block until one is available
Parameters format:
key1,key2,key3,. |
|
BRPop ( string | array $key, integer $timeout ) |
Remove and get the last element in a list, or block until one is available
Parameters format:
key1,key2,key3,. |
|
BRPopLPush ( $source, $destination, $timeout ) : string | boolean |
Pop a value from a list, push it to another list and return it; or block until one is available |
|
CLIENT_GETNAME ( ) |
Get the current connection name |
|
CLIENT_KILL ( $ip, $port ) : boolean |
The CLIENT KILL command closes a given client connection identified by ip:port. |
|
CLIENT_LIST ( ) |
Get the list of client connections |
|
CLIENT_SETNAME ( string $connection_name ) : boolean |
Set the current connection name |
|
Config_Get ( string $parameter ) : string |
Get the value of a configuration parameter |
|
Config_ResetStat ( ) |
Resets the statistics reported by Redis using the INFO command. |
|
Config_Set ( $parameter, $value ) : boolean |
Set the value of a configuration parameter |
|
DBsize ( ) : integer |
Return the number of keys in the selected database |
|
DEBUG_OBJECT ( string $key ) |
Get debugging information about a key |
|
DEBUG_SEGFAULT ( ) |
Make the server crash |
|
DUMP ( string $key ) : string |
Serialize the value stored at key in a Redis-specific format and return it to the user. |
|
Decr ( string $key ) : integer |
Decrement the integer value of a key by one |
|
DecrBy ( string $key, integer $decrement ) : integer |
Decrement the integer value of a key by the given number |
|
Del ( string $key ) : integer |
Delete a key
Parameters: $key1, $key2, . |
|
Discard ( ) |
Flushes all previously queued commands in a transaction and restores the connection state to normal. |
|
ECHO_ ( string $message ) |
Echo the given string |
|
EVALSHA ( $sha1, array $keys, array $args ) : mixed |
Execute a Lua script server side |
|
EVAL_ ( string $script, array $keys, array $args ) : mixed |
Execute a Lua script server side |
|
Exec ( ) |
Executes all previously queued commands in a transaction and restores the connection state to normal. |
|
Exists ( string $key ) : integer |
Determine if a key exists |
|
Expire ( string $key, integer $seconds ) : boolean |
Set a key's time to live in seconds |
|
Expireat ( string $key, integer $timestamp ) : integer |
Set the expiration for a key as a UNIX timestamp |
|
FlushAll ( ) |
Remove all keys from all databases |
|
FlushDB ( ) |
Remove all keys from the current database |
|
Get ( string $key ) : string |
Get the value of a key |
|
GetBit ( string $key, integer $offset ) |
Returns the bit value at offset in the string value stored at key |
|
GetRange ( string $key, integer $start, integer $end ) : string |
Get a substring of the string stored at a key |
|
GetSet ( string $key, string $value ) : string |
Atomically sets key to value and returns the old value stored at key. |
|
HINCRBYFLOAT ( string $key, string $field, float $increment ) : float |
Increment the specified field of an hash stored at key, and representing a floating point number, by the specified increment. |
|
INCRBYFLOAT ( string $key, float $increment ) : float |
Increment the string representing a floating point number stored at key by the specified increment. |
|
Incr ( string $key ) : integer |
Increment the integer value of a key by one |
|
IncrBy ( string $key, integer $increment ) : integer |
Increment the integer value of a key by the given number |
|
Info ( ) |
Get information and statistics about the server |
|
Keys ( string $pattern ) : array |
Returns all keys matching pattern. |
|
LASTSAVE ( ) |
Get the UNIX time stamp of the last successful save to disk Ping the server |
|
LIndex ( string $key, integer $index ) : string | boolean |
Returns the element at index $index in the list stored at $key. |
|
LInsert ( string $key, boolean $after = true, string $pivot, string $value ) : integer |
Insert an element before or after another element in a list |
|
LLen ( string $key ) : integer |
Get the length of a list |
|
LPop ( string $key ) : string | boolean |
Remove and get the first element in a list |
|
LPush ( string $key, string | array $value ) : integer |
Inserts value at the head of the list stored at key. |
|
LPushX ( string $key, string $value ) : integer |
Inserts value at the head of the list stored at key, only if key already exists and holds a list. |
|
LRange ( string $key, integer $start, integer $stop ) : array |
Returns the specified elements of the list stored at key. |
|
LRem ( string $key, integer $count, string $value ) : integer |
Removes the first count occurrences of elements equal to value from the list stored at key. |
|
LSet ( $key, $index, $value ) : boolean |
Sets the list element at index to value. |
|
LTrim ( string $key, integer $start, integer $stop ) : boolean |
Trim a list to the specified range |
|
MGet ( string $key ) : array |
Returns the values of all specified keys. |
|
MIGRATE ( string $host, string $port, string $key, integer $destination_db, integer $timeout ) : boolean |
Atomically transfer a key from a Redis instance to another one. |
|
MONITOR ( ) |
Listen for all requests received by the server in real time |
|
MSet ( array $keys ) : string |
Set multiple keys to multiple values |
|
MSetNX ( array $keys ) : integer |
Set multiple keys to multiple values, only if none of the keys exist |
|
Move ( string $key, integer $db ) : integer |
Move key from the currently selected database (see SELECT) to the specified destination database. |
|
Multi ( ) |
Mark the start of a transaction block |
|
OBJECT ( string $subcommand, array $arguments = [] ) |
Inspect the internals of Redis objects |
|
PEXPIRE ( string $key, integer $milliseconds ) : integer |
Set a key's time to live in milliseconds |
|
PEXPIREAT ( string $key, integer $milliseconds_timestamp ) : integer |
Set the expiration for a key as a UNIX timestamp specified in milliseconds |
|
PING ( ) |
Ping the server |
|
PSETEX ( string $key, integer $milliseconds, string $value ) : boolean |
Set the value and expiration in milliseconds of a key |
|
PSubscribe ( string $pattern ) |
Subscribes the client to the given patterns. |
|
PTTL ( string $key ) : integer |
Get the time to live for a key in milliseconds |
|
PUnsubscribe ( array | string | null $pattern = null ) : integer |
Stop listening for messages posted to channels matching the given patterns |
|
Persist ( string $key ) : integer |
Remove the expiration from a key |
|
Publish ( string $channel, string $message ) : integer |
Post a message to a channel
Returns the number of clients that received the message. |
|
Quit ( ) |
Close the connection |
|
RANDOMKEY ( ) |
Return a random key from the keyspace |
|
RESTORE ( string $key, integer $ttl, string $serialized_value ) : boolean |
Create a key using the provided serialized value, previously obtained using DUMP. |
|
RPop ( string $key ) : string | boolean |
Removes and returns the last element of the list stored at key. |
|
RPopLPush ( string $source, string $destination ) : string |
Atomically returns and removes the last element (tail) of the list stored at source,
and pushes the element at the first element (head) of the list stored at destination. |
|
RPush ( string $key, string | array $value ) : integer | boolean |
Inserts value at the tail of the list stored at key. |
|
RPushX ( string $key, string $value ) : integer |
Append a value to a list, only if the list exists |
|
Rename ( string $key, string $newkey ) : boolean |
Renames key to newkey. |
|
RenameNX ( string $key, string $newkey ) : integer |
Rename a key, only if the new key does not exist |
|
SAVE ( ) |
Synchronously save the dataset to disk |
|
SCRIPT_EXISTS ( string $script ) : array |
Check existence of scripts in the script cache. |
|
SCRIPT_FLUSH ( ) |
Remove all the scripts from the script cache. |
|
SCRIPT_KILL ( ) |
Kills the currently executing Lua script, assuming no write operation was yet performed by the script. |
|
SCRIPT_LOAD ( string $script ) : string |
Load a script into the scripts cache, without executing it. |
|
SHUTDOWN ( boolean $save = false, boolean $nosave = false ) |
Synchronously save the dataset to disk and then shut down the server
One of modifiers can be turned on: |
|
SLOWLOG ( string $subcommand, string $argument = '' ) |
Manages the Redis slow queries log |
|
SPOP ( string $key ) |
Remove and return a random member from a set |
|
SRANDMEMBER ( string $key, integer $count = 1 ) |
Get a random member from a set |
|
SYNC ( ) |
Internal command used for replication |
|
Select ( integer $index ) |
Select the DB with having the specified zero-based numeric index. New connections always use DB 0. |
|
Set ( string $key, string $value ) : string |
Set key to hold the string value. If key already holds a value, it is overwritten, regardless of its type. |
|
SetBit ( string $key, integer $offset, integer $value ) : integer |
Sets or clears the bit at offset in the string value stored at key |
|
SetEX ( string $key, integer $seconds, string $value ) : boolean |
Set the value and expiration of a key |
|
SetNX ( string $key, string $value ) : boolean |
Set the value of a key, only if the key does not exist |
|
SetRange ( string $key, integer $offset, string $value ) : integer |
Overwrites part of the string stored at key, starting at the specified offset, for the entire length of value. |
|
SlaveOf ( string $host, integer $port ) : string |
Make the server a slave of another instance, or promote it as master |
|
Sort ( string $key, string $sort_rule ) : array |
Sort the elements in a list, set or sorted set |
|
StrLen ( string $key ) : integer |
Get the length of the value stored in a key |
|
Subscribe ( $channel ) |
Subscribes the client to the specified channels. |
|
TIME ( ) : array |
Returns the current server time as a two items lists: a Unix timestamp and the amount of microseconds already elapsed in the current second |
|
TTL ( string $key ) : integer |
Get the time to live for a key |
|
Type ( string $key ) : string |
Returns the string representation of the type of the value stored at key. |
|
Unsubscribe ( string $channel = '' ) |
Unsubscribes the client from the given channels, or from all of them if none is given. |
|
Unwatch ( ) |
Forget about all watched keys |
|
Watch ( string $key ) |
Marks the given keys to be watched for conditional execution of a transaction
each argument is a key:
watch('key1', 'key2', 'key3', . |
|
bgRewriteAOF ( ) |
Rewrites the append-only file to reflect the current dataset in memory. |
|
bgSave ( ) |
Asynchronously save the dataset to disk |
|
hDel ( string $key, array | string $field ) : integer |
Removes the specified fields from the hash stored at key. |
|
hExists ( string $key, string $field ) : integer |
Determine if a hash field exists |
|
hGet ( string $key, string $field ) : string | integer |
Get the value of a hash field |
|
hGetAll ( string $key ) : array |
Get all the fields and values in a hash |
|
hIncrBy ( string $key, string $field, integer $increment ) : integer |
Increments the number stored at field in the hash stored at key by increment. |
|
hKeys ( string $key ) : array |
Get all the fields in a hash |
|
hLen ( string $key ) : integer |
Get the number of fields in a hash |
|
hMGet ( string $key, array $fields ) : array |
Returns the values associated with the specified fields in the hash stored at key. |
|
hMSet ( string $key, array $fields ) |
Set multiple hash fields to multiple values |
|
hSet ( string $key, string $field, string $value ) : integer |
Set the string value of a hash field |
|
hSetNX ( string $key, string $field, string $value ) : integer |
Set the value of a hash field, only if the field does not exist |
|
hVals ( string $key ) : array |
Get all the values in a hash |
|
sAdd ( string $key, string | array $member ) : boolean |
Add a member to a set |
|
sCard ( string $key ) : integer |
Get the number of members in a set |
|
sDiff ( string | array $key ) : array |
Returns the members of the set resulting from the difference between the first set and all the successive sets. |
|
sDiffStore ( string $destination, string | array $key ) : integer |
This command is equal to SDIFF, but instead of returning the resulting set, it is stored in destination. |
|
sInter ( string | array $key ) : array |
Returns the members of the set resulting from the intersection of all the given sets. |
|
sInterStore ( string $destination, string | array $key ) : integer |
Intersect multiple sets and store the resulting set in a key
This command is equal to SINTER, but instead of returning the resulting set, it is stored in destination. |
|
sIsMember ( string $key, string $member ) : boolean |
Returns if value is a member of the set. |
|
sMembers ( string $key ) : array |
Returns all the members of the set. |
|
sMove ( string $source, string $destination, string $member ) : integer |
Move member from the set at source to the set at destination. |
|
sRem ( string $key, string $member ) : boolean |
Remove member from the set. If 'value' is not a member of this set, no operation is performed. |
|
sUnion ( string | array $key ) : array |
Returns the members of the set resulting from the union of all the given sets. |
|
sUnionStore ( $destination, string | array $key ) : integer |
Add multiple sets and store the resulting set in a key
Parameters: $destination, $key [key . |
|
zAdd ( string $key, integer | array $score, string $member = NULL ) : integer |
Add a member to a sorted set, or update its score if it already exists |
|
zCard ( string $key ) : integer |
Get the number of members in a sorted set |
|
zCount ( string $key, string | integer $min, string | integer $max ) : integer |
Returns the number of elements in the sorted set at key with a score between min and max. |
|
zIncrBy ( string $key, number $increment, string $member ) : number |
Increment the score of a member in a sorted set |
|
zInterStore ( string $destination, array $keys, array $weights = null, string | null $aggregate = null ) : integer |
Intersect multiple sorted sets and store the resulting sorted set in a new key |
|
zRange ( string $key, integer $start, integer $stop, boolean $withscores = false ) : array |
|
|
zRangeByScore ( string $key, string | number $min, string | number $max, boolean $withscores = false, array $limit = null ) : array |
Return a range of members in a sorted set, by score |
|
zRank ( string $key, string $member ) : integer | boolean |
Returns the rank of member in the sorted set stored at key, with the scores ordered from low to high. |
|
zRem ( string $key, string | array $member ) : integer |
Remove a member from a sorted set |
|
zRemRangeByRank ( string $key, integer $start, integer $stop ) : integer |
Removes all elements in the sorted set stored at key with rank between start and stop. |
|
zRemRangeByScore ( string $key, string | number $min, string | number $max ) : integer |
Remove all members in a sorted set within the given scores |
|
zRevRange ( string $key, integer $start, integer $stop, boolean $withscores = false ) : array |
Returns the specified range of elements in the sorted set stored at key. |
|
zRevRangeByScore ( string $key, number $max, number $min, boolean $withscores = false, array $limit = null ) : array |
Returns all the elements in the sorted set at key with a score between max and min
(including elements with score equal to max or min). |
|
zRevRank ( string $key, string $member ) : integer | boolean |
Returns the rank of member in the sorted set stored at key, with the scores ordered from high to low. |
|
zScore ( string $key, string $member ) : string |
Get the score associated with the given member in a sorted set |
|
zUnionStore ( string $destination, array $keys, array $weights = null, string | null $aggregate = null ) : integer |
Add multiple sorted sets and store the resulting sorted set in a new key |
|