Relay
class Relay
Relay client.
Constants
VERSION |
Relay's version. |
Version |
Relay's version. |
COMPRESSION_NONE |
Integer representing no compression algorithm. |
COMPRESSION_LZF |
Integer representing the LZF compression algorithm. |
COMPRESSION_ZSTD |
Integer representing the Zstandard compression algorithm. |
COMPRESSION_LZ4 |
Integer representing the LZ4 compression algorithm. |
SERIALIZER_NONE |
Integer representing no serializer. |
SERIALIZER_PHP |
Integer representing the PHP serializer. |
SERIALIZER_IGBINARY |
Integer representing the igbinary serializer. |
SERIALIZER_MSGPACK |
Integer representing the MessagePack serializer. |
SERIALIZER_JSON |
Integer representing the JSON serializer. |
ATOMIC |
Integer representing the atomic mode. |
PIPELINE |
Integer representing the pipeline mode. |
MULTI |
Integer representing the |
SUBSCRIBED |
Integer representing we're SUBSCRIBED. Note that this constant can
only really be accessed when |
OPT_PREFIX |
Integer representing the prefix option. |
OPT_READ_TIMEOUT |
Integer representing the read timeout option. |
OPT_MAX_RETRIES |
Integer representing the maximum retries option. |
OPT_BACKOFF_ALGORITHM |
Integer representing the backoff algorithm. |
OPT_TCP_KEEPALIVE |
Toggle TCP_KEEPALIVE on a connection |
BACKOFF_ALGORITHM_DEFAULT |
Integer representing the default backoff algorithm. |
BACKOFF_ALGORITHM_DECORRELATED_JITTER |
Integer representing the decorrelated jitter backoff algorithm. |
BACKOFF_ALGORITHM_FULL_JITTER |
Integer representing the full jitter backoff algorithm. |
OPT_BACKOFF_BASE |
Integer representing the base for backoff computation. |
OPT_BACKOFF_CAP |
Integer representing the backoff time cap. |
OPT_PHPREDIS_COMPATIBILITY |
Integer representing the PhpRedis compatibility mode option. Enabled by default. Disabling will cause Relay to:
|
OPT_SERIALIZER |
Integer representing the serializer option. |
OPT_COMPRESSION |
Integer representing the compression option. |
OPT_COMPRESSION_LEVEL |
Integer representing the compression level option. |
OPT_REPLY_LITERAL |
Integer representing the reply literal option. |
OPT_NULL_MULTIBULK_AS_NULL |
Integer representing the null-multi-bulk-as-null option. |
OPT_THROW_ON_ERROR |
Integer representing the throw-on-error option. Disabled by default. When enabled, Relay will throw exceptions when errors occur. |
OPT_CLIENT_INVALIDATIONS |
Integer representing Relay’s invalidation option. Enabled by default. When disabled will prevent Relay from
performing instantaneous client-side invalidation when a key
is changed without waiting for Redis to send an |
OPT_ALLOW_PATTERNS |
Integer representing Relay’s allow patterns option. When set only keys matching these patterns will be cached,
unless they also match an |
OPT_IGNORE_PATTERNS |
Integer representing Relay’s ignore patterns option. When set keys matching these patterns will not be cached. |
OPT_USE_CACHE |
Whether use in-memory caching. Enabled by default. |
OPT_SCAN |
Integer representing the scan option. |
SCAN_NORETRY |
Issue one |
SCAN_RETRY |
Retry the |
SCAN_PREFIX |
Prepend the set prefix to any |
SCAN_NOPREFIX |
Do not prepend the set prefix to any |
internal BEFORE |
Redis command argument. |
internal AFTER |
Redis command argument. |
internal LEFT |
Redis command argument. |
internal RIGHT |
Redis command argument. |
REDIS_NOT_FOUND |
Integer representing "key not found". |
REDIS_STRING |
Integer representing Redis |
REDIS_SET |
Integer representing Redis |
REDIS_LIST |
Integer representing Redis |
REDIS_ZSET |
Integer representing Redis |
REDIS_HASH |
Integer representing Redis |
REDIS_STREAM |
Integer representing Redis |
Methods
Establishes a new connection to Redis, or re-uses already opened connection.
Establishes a new connection to Redis.
Establishes a persistent connection to Redis.
Closes the current connection, unless it's persistent.
Closes the current connection, if it's persistent.
Registers a new event listener.
Registers a new flushed
event listener.
Registers a new invalidated
event listener.
Dispatches all pending events.
Returns a client option.
Returns or sets a client option.
Sets a client option.
Adds ignore pattern(s). Matching keys will not be cached in memory.
Adds allow pattern(s). Only matching keys will be cached in memory.
Returns the connection timeout.
No description
Returns the read timeout.
No description
Returns the number of bytes sent and received over the network during the Relay object's lifetime, or since the last time Relay::clearBytes() was called.
No description
Returns the host or unix socket.
Whether Relay is connected to Redis.
Returns the port.
Returns the authentication information.
Returns the currently selected DB
Returns the serialized value.
Returns the unserialized value.
Compress data with Relay's currently configured compression algorithm.
Uncompress data with Relay's currently configured compression algorithm.
Returns the serialized and compressed value.
Returns the unserialized and decompressed value.
Returns the value with the prefix.
Returns the last error message, if any.
Clears the last error that is set, if any.
Returns the connection's endpoint identifier.
No description
Returns a unique representation of the underlying socket connection identifier.
Returns statistics about Relay.
Returns the number of bytes allocated, or 0
in client-only mode.
Execute any command against Redis, without applying the prefix, compression and serialization.
Select the Redis logical database having the specified zero-based numeric index.
Authenticate the connection using a password or an ACL username and password.
The INFO command returns information and statistics about Redis in a format that is simple to parse by computers and easy to read by humans.
Deletes all the keys of the currently selected database.
Deletes all the keys of all the existing databases, not just the currently selected one.
Invokes a Redis function.
Invokes a read-only Redis function.
Calls FUNCTION
sub-command.
Flushes Relay's in-memory cache of all databases.
Returns the number of keys in the currently-selected database.
Serialize and return the value stored at key in a Redis-specific format.
Attach or detach the instance as a replica of another instance.
Create a key associated with a value that is obtained by deserializing the provided serialized value.
Atomically transfer a key from a Redis instance to another one.
This command copies the value stored at the source key to the destination key.
Asks Redis to echo back the provided string.
Returns PONG if no argument is provided, otherwise return a copy of the argument as a bulk.
Returns the number of milliseoconds since Relay has seen activity from the server.
Returns a random key from Redis.
Returns the current time from Redis.
Asynchronously rewrite the append-only file.
Returns the UNIX time stamp of the last successful save to disk.
Asynchronously save the dataset to disk.
Synchronously save the dataset to disk.
Returns the role of the instance in the context of replication.
Returns the remaining time to live of a key that has a timeout in seconds.
Returns the remaining time to live of a key that has a timeout in milliseconds.
Returns if key(s) exists.
Evaluate script using the Lua interpreter.
Evaluate script using the Lua interpreter. This is just the "read-only" variant of EVAL meaning it can be run on read-only replicas.
Evaluates a script cached on the server-side by its SHA1 digest.
Evaluates a script cached on the server-side by its SHA1 digest. This is just the "read-only" variant
of EVALSHA
meaning it can be run on read-only replicas.
Executes CLIENT
command operations.
Add one or more members to a geospacial sorted set
Get the distance between two members of a geospacially encoded sorted set.
Retrieve one or more GeoHash encoded strings for members of the set.
Retrieve members of a geospacially sorted set that are within a certain radius of a location.
Similar to GEORADIUS
except it uses a member as the center of the query.
Similar to GEORADIUS
except it uses a member as the center of the query.
Retrieve members of a geospacially sorted set that are within a certain radius of a location.
Search a geospacial sorted set for members in various ways.
Search a geospacial sorted set for members within a given area or range, storing the results into a new set.
Get the value of key.
Atomically sets key to value and returns the old value stored at key.
Returns the substring of the string value stored at key, determined by the offsets start and end (both are inclusive).
Overwrites part of the string stored at key, starting at the specified offset, for the entire length of value.
Returns the bit value at offset in the string value stored at key.
Count the number of set bits (population counting) in a string.
Perform various bitfield operations on a string key, such as getting/setting bit ranges, incrementing, etc.
This is a container command for runtime configuration commands.
Return an array with details about every Redis command.
Perform a bitwise operation on one or more keys, storing the result in a new key.
Return the position of the first bit set to 1 or 0 in a string.
Sets or clears the bit at offset in the string value stored at key.
Interact with Redis' ACLs
If key already exists and is a string, this command appends the value at the end of the string. If key does not exist it is created and set as an empty string, so APPEND will be similar to SET in this special case.
Set key to hold the string value. If key already holds a value, it is overwritten, regardless of its type.
Get the value of key and optionally set its expiration.
Get the value of key and delete the key. This command is similar to GET, except for the fact that it also deletes the key on success (if and only if the key's value type is a string).
Set key to hold the string value and set key to timeout after a given number of seconds.
Adds the specified elements to the specified HyperLogLog.
Return the approximated cardinality of the set(s) observed by the HyperLogLog at key(s).
Merge given HyperLogLogs into a single one.
Set key to hold the string value and set key to timeout after a given number of milliseconds.
Posts a message to the given channel.
A container command for Pub/Sub introspection commands.
Posts a message to the given shard channel.
Set key to hold string value if key does not exist. In that case, it is equal to SET.
Returns the values of all specified keys.
Move key from the currently selected database to the specified destination database.
Sets the given keys to their respective values.
Sets the given keys to their respective values.
Renames key.
Renames key if the new key does not yet exist.
Removes the specified keys.
Removes the specified keys without blocking Redis.
Set a timeout on key.
Set a key's time to live in milliseconds.
Set a timeout on key using a unix timestamp.
Returns the absolute Unix timestamp in seconds at which the given key will expire.
Set the expiration for a key as a UNIX timestamp specified in milliseconds.
Semantic the same as EXPIRETIME, but returns the absolute Unix expiration timestamp in milliseconds instead of seconds.
Remove the existing timeout on key, turning the key from volatile to persistent.
Returns the type of a given key.
Atomically returns and removes the first/last element of the list stored at source, and pushes the element at the first/last element of the list stored at destination.
BLMOVE is the blocking variant of LMOVE. When source contains elements, this command behaves exactly like LMOVE. When used inside a MULTI/EXEC block, this command behaves exactly like LMOVE.
Returns the specified elements of the list stored at key.
Insert all the specified values at the head of the list stored at key.
Insert all the specified values at the tail of the list stored at key.
Inserts specified values at the head of the list stored at key, only if key already exists and holds a list.
Inserts specified values at the tail of the list stored at key, only if key already exists and holds a list.
Sets the list element at index to element.
Removes and returns the first elements of the list stored at key.
The command returns the index of matching elements inside a Redis list.
Removes and returns the last elements of the list stored at key.
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.
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.
BLPOP is a blocking list pop primitive. It is the blocking version of LPOP because it blocks the connection when there are no elements to pop from any of the given lists.
Pop elements from a list, or block until one is available
Remove and return members with scores in a sorted set or block until one is available
Pops one or more elements from the first non-empty list key from the list of provided key names.
Pops one or more elements, that are member-score pairs, from the first non-empty sorted set in the provided list of key names.
BRPOP is a blocking list pop primitive. It is the blocking version of RPOP because it blocks the connection when there are no elements to pop from any of the given lists.
BZPOPMAX is the blocking variant of the sorted set ZPOPMAX primitive.
BZPOPMIN is the blocking variant of the sorted set ZPOPMIN primitive.
This is a container command for object introspection commands.
Return the positions (longitude,latitude) of all the specified members of the geospatial index represented by the sorted set at key.
Removes the first count occurrences of elements equal to element from the list stored at key.
Returns the element at index index in the list stored at key.
Inserts element in the list stored at key either before or after the reference value pivot.
Trim an existing list so that it will contain only the specified range of elements specified.
Returns the value associated with field in the hash stored at key.
Returns the string length of the value associated with field in the hash stored at key.
Returns all fields and values of the hash stored at key.
Returns all field names in the hash stored at key.
Returns all values in the hash stored at key.
Returns the values associated with the specified fields in the hash stored at key.
When called with just the key argument, return a random field from the hash value stored at key.
Sets the specified fields to their respective values in the hash stored at key.
Returns if field is an existing field in the hash stored at key.
Sets field in the hash stored at key to value, only if field does not yet exist.
Sets field in the hash stored at key to value.
Removes the specified fields from the hash stored at key.
Increments the number stored at field in the hash stored at key by increment.
Increment the specified field of a hash stored at key, and representing a floating point number, by the specified increment.
Increments the number stored at key by one.
Decrements the number stored at key by one.
Increments the number stored at key by increment.
Decrements the number stored at key by decrement.
Increment the string representing a floating point number stored at key by the specified increment.
Returns the members of the set resulting from the difference between the first set and all the successive sets.
This command is equal to SDIFF, but instead of returning the resulting set, it is stored in destination.
Returns the members of the set resulting from the intersection of all the given sets.
Intersect multiple sets and return the cardinality of the result.
This command is equal to SINTER, but instead of returning the resulting set, it is stored in destination.
Returns the members of the set resulting from the union of all the given sets.
This command is equal to SUNION, but instead of returning the resulting set, it is stored in destination.
Subscribes to the specified channels.
Unsubscribes from the given channels, or from all of them if none is given.
Subscribes to the given patterns.
Unsubscribes from the given patterns, or from all of them if none is given.
Subscribes to the specified shard channels.
Unsubscribes from the given shard channels, or from all of them if none is given.
Alters the last access time of a key(s).
A pipeline block is simply transmitted faster to the server (like MULTI
), but without any guarantee of atomicity.
Marks the start of a transaction block. Subsequent commands will be queued for atomic execution using EXEC.
Executes all previously queued commands in a transaction and restores the connection state to normal.
Wait for the synchronous replication of all the write commands sent in the context of the current connection.
Marks the given keys to be watched for conditional execution of a transaction.
Flushes all the previously watched keys for a transaction.
Flushes all previously queued commands in a transaction and restores the connection state to normal.
Get the mode Relay is currently in.
Clear the accumulated sent and received bytes.
Scan the keyspace for matching keys.
Iterates fields of Hash types and their associated values.
Iterates elements of Sets types.
Iterates elements of Sorted Set types and their associated scores.
Returns all keys matching pattern.
Interact with the Redis slowlog.
Returns all the members of the set value stored at $key
.
Returns if $member
is a member of the set stored at $key
.
Returns whether each member is a member of the set stored at $key
.
Remove the specified members from the set stored at $key
.
Add the specified members to the set stored at $key
.
Sort the elements in a list, set or sorted set.
Sort the elements in a list, set or sorted set. Read-only variant of SORT.
Move member from the set at source to the set at destination.
Removes and returns one or more random members from the set value store at $key
.
Returns one or multiple random members from a set.
Returns the set cardinality (number of elements) of the set stored at $key
.
Execute a script management command.
Returns the length of the string value stored at $key
.
Returns the number of fields contained in the hash stored at $key
.
Returns the length of the list stored at $key
.
Acknowledge one or more IDs as having been processed by the consumer group.
Append a message to a stream.
Claim ownership of stream message(s).
Automatically take ownership of stream message(s) by metrics
Get the length of a stream.
Perform utility operations having to do with consumer groups
Remove one or more specific IDs from a stream.
Retrieve information about a stream key.
Query pending entries in a stream.
Lists elements in a stream.
Get a range of entries from a STREAM ke in reverse chronological order.
Read messages from a stream.
Read messages from a stream using a consumer group.
Truncate a STREAM key in various ways.
Adds all the specified members with the specified scores to the sorted set stored at key.
When called with just the key argument, return a random element from the sorted set value stored at key.
Returns the specified range of elements in the sorted set stored at key.
Returns the specified range of elements in the sorted set stored at key.
Returns all the elements in the sorted set at key with a score between min and max (including elements with score equal to min or max).
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).
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).
When all the elements in a sorted set are inserted with the same score, in order to force lexicographical ordering, this command returns all the elements in the sorted set at key with a value between min and max.
When all the elements in a sorted set are inserted with the same score, in order to force lexicographical ordering, this command returns all the elements in the sorted set at key with a value between max and min.
Returns the rank of member in the sorted set stored at key, with the scores ordered from low to high. The rank (or index) is 0-based, which means that the member with the lowest score has rank 0.
Returns the rank of member in the sorted set stored at key, with the scores ordered from high to low. The rank (or index) is 0-based, which means that the member with the highest score has rank 0.
Removes the specified members from the sorted set stored at key.
When all the elements in a sorted set are inserted with the same score, in order to force lexicographical ordering, this command removes all elements in the sorted set stored at key between the lexicographical range specified by min and max.
Removes all elements in the sorted set stored at key with rank between start and stop. Both start and stop are 0 -based indexes with 0 being the element with the lowest score.
Removes all elements in the sorted set stored at key with a score between min and max (inclusive).
Returns the sorted set cardinality (number of elements) of the sorted set stored at key.
Returns the number of elements in the sorted set at key with a score between min and max.
This command is similar to ZDIFFSTORE, but instead of storing the resulting sorted set, it is returned to the client.
Computes the difference between the first and all successive input sorted sets and stores the result in destination.
Increments the score of member in the sorted set stored at key by increment.
When all the elements in a sorted set are inserted with the same score, in order to force lexicographical ordering, this command returns the number of elements in the sorted set at key with a value between min and max.
Returns the scores associated with the specified members in the sorted set stored at key.
Returns the score of member in the sorted set at key.
This command is similar to ZINTERSTORE, but instead of storing the resulting sorted set, it is returned to the client.
Intersect multiple sorted sets and return the cardinality of the result.
Computes the intersection of numkeys sorted sets given by the specified keys, and stores the result in destination.
This command is similar to ZUNIONSTORE, but instead of storing the resulting sorted set, it is returned to the client.
Computes the union of numkeys sorted sets given by the specified keys, and stores the result in destination.
Removes and returns up to count members with the lowest scores in the sorted set stored at key.
Removes and returns up to count members with the highest scores in the sorted set stored at key.
Returns keys cached in runtime memory.
Returns information about the license.
Details
at line 457
__construct(string|array|null $host = null, int $port = 6379, float $connect_timeout = 0.0, float $command_timeout = 0.0, array $context = [], int $database = 0)
Establishes a new connection to Redis, or re-uses already opened connection.
at line 482
bool
connect(string $host, int $port = 6379, float $timeout = 0.0, string|null $persistent_id = null, int $retry_interval = 0, float $read_timeout = 0.0, array $context = [], int $database = 0)
Establishes a new connection to Redis.
Will use pconnect()
unless relay.default_pconnect
is disabled.
at line 508
bool
pconnect(string $host, int $port = 6379, float $timeout = 0.0, string|null $persistent_id = null, int $retry_interval = 0, float $read_timeout = 0.0, array $context = [], int $database = 0)
Establishes a persistent connection to Redis.
at line 526
bool
close()
Closes the current connection, unless it's persistent.
at line 534
bool
pclose()
Closes the current connection, if it's persistent.
at line 543
bool
listen(callable|null $callback)
Registers a new event listener.
at line 552
bool
onFlushed(callable|null $callback)
Registers a new flushed
event listener.
at line 562
bool
onInvalidated(callable|null $callback, string|null $pattern = null)
Registers a new invalidated
event listener.
at line 570
int|false
dispatchEvents()
Dispatches all pending events.
at line 579
mixed
getOption(int $option)
Returns a client option.
at line 589
mixed
option(int $option, mixed $value = null)
Returns or sets a client option.
at line 621
bool
setOption(int $option, mixed $value)
Sets a client option.
Relay specific options:
OPT_ALLOW_PATTERNS
OPT_IGNORE_PATTERNS
OPT_THROW_ON_ERROR
OPT_CLIENT_INVALIDATIONS
OPT_PHPREDIS_COMPATIBILITY
Supported PhpRedis options:
OPT_PREFIX
OPT_READ_TIMEOUT
OPT_COMPRESSION
OPT_COMPRESSION_LEVEL
OPT_MAX_RETRIES
OPT_BACKOFF_ALGORITHM
OPT_BACKOFF_BASE
OPT_BACKOFF_CAP
OPT_SCAN
OPT_REPLY_LITERAL
OPT_NULL_MULTIBULK_AS_NULL
at line 630
int
addIgnorePatterns(string ...$pattern)
Adds ignore pattern(s). Matching keys will not be cached in memory.
at line 639
int
addAllowPatterns(string ...$pattern)
Adds allow pattern(s). Only matching keys will be cached in memory.
at line 647
float|false
getTimeout()
Returns the connection timeout.
at line 655
float|false
timeout()
No description
at line 663
float|false
getReadTimeout()
Returns the read timeout.
at line 671
float|false
readTimeout()
No description
at line 680
array
getBytes()
Returns the number of bytes sent and received over the network during the Relay object's lifetime, or since the last time Relay::clearBytes() was called.
at line 688
array
bytes()
No description
at line 696
string|false
getHost()
Returns the host or unix socket.
at line 704
bool
isConnected()
Whether Relay is connected to Redis.
at line 712
int|false
getPort()
Returns the port.
at line 721
mixed
getAuth()
Returns the authentication information.
In PhpRedis compatibility mode this method returns any configured password in plain-text.
at line 729
mixed
getDbNum()
Returns the currently selected DB
at line 738
mixed
_serialize(mixed $value)
Returns the serialized value.
at line 747
mixed
_unserialize(mixed $value)
Returns the unserialized value.
at line 756
string
_compress(string $value)
Compress data with Relay's currently configured compression algorithm.
at line 765
string
_uncompress(string $value)
Uncompress data with Relay's currently configured compression algorithm.
at line 774
string
_pack(mixed $value)
Returns the serialized and compressed value.
at line 783
mixed
_unpack(mixed $value)
Returns the unserialized and decompressed value.
at line 792
string
_prefix(mixed $value)
Returns the value with the prefix.
at line 800
string|null
getLastError()
Returns the last error message, if any.
at line 808
bool
clearLastError()
Clears the last error that is set, if any.
at line 816
string|false
endpointId()
Returns the connection's endpoint identifier.
at line 824
string|false
getPersistentID()
No description
at line 831
string|false
socketId()
Returns a unique representation of the underlying socket connection identifier.
at line 867
static array
stats()
Returns statistics about Relay.
-
usage.total_requests
: The total number of requests we've seen -
usage.active_requests
: The number of requests currently in-flight -
usage.max_active_requests
: The most concurrent in-flight requests we've seen -
usage.free_epoch_records
: The estimated number of free epoch reclamation records -
stats.requests
: The total number of requests the cache has received -
stats.misses
: Requests where we had to ask Redis for a value -
stats.hits
: Requests where we did not have to ask redis for the value -
stats.dirty_skips
: The number of times Relay has skipped an entire database because it was dirty. -
stats.errors
: How many times a 'severe' error occurs (presently this is only incremented if we get anull
response from hiredis) -
stats.empty
: How many times we've run out of free requests (indicating the size of the ring buffers should be increased) -
stats.oom
: The number of times we've run out of memory -
stats.ops_per_sec
: The number of commands processed per second -
stats.bytes_sent
: The number of bytes Relay has written to the network -
stats.bytes_received
: The number of bytes Relay has read from the network -
stats.command_usec
: Deprecated -
stats.rinit_usec
: The number of microseconds Relay has spent in request initialization -
stats.rshutdown_usec
: The number of microseconds Relay has spent in request shutdown -
stats.sigio_usec
: The number of microseconds Relay has spent in its SIGIO handler -
memory.total
: The total bytes of allocated memory -
memory.limit
: The capped number of bytes Relay has available to use -
memory.active
: The total amount of memory mapped into the allocator -
memory.used
: The amount of memory pointing to live objects including metadata -
endpoints.*.redis
: Information about the connected Redis server. -
endpoints.*.connections.*.keys
: The total number of cached keys for the connection.
at line 875
static int
maxMemory()
Returns the number of bytes allocated, or 0
in client-only mode.
at line 885
static int
memory()
deprecated
deprecated
Returns the number of bytes allocated, or 0
in client-only mode.
at line 896
mixed
rawCommand(string $cmd, mixed ...$args)
Execute any command against Redis, without applying the prefix, compression and serialization.
at line 905
Relay|bool
select(int $db)
Select the Redis logical database having the specified zero-based numeric index.
at line 914
bool
auth(mixed $auth)
Authenticate the connection using a password or an ACL username and password.
at line 926
Relay|array|false
info(string ...$sections)
The INFO command returns information and statistics about Redis in a format that is simple to parse by computers and easy to read by humans.
at line 935
Relay|bool
flushdb(bool $async = false)
Deletes all the keys of the currently selected database.
at line 944
Relay|bool
flushall(bool $async = false)
Deletes all the keys of all the existing databases, not just the currently selected one.
at line 956
mixed
fcall(string $name, array $keys = [], array $argv = [], callable $handler = null)
Invokes a Redis function.
at line 968
mixed
fcall_ro(string $name, array $keys = [], array $argv = [], callable $handler = null)
Invokes a read-only Redis function.
at line 978
mixed
function(string $op, string ...$args)
Calls FUNCTION
sub-command.
at line 991
static bool
flushMemory(string|null $endpointId = null, int $db = null)
Flushes Relay's in-memory cache of all databases.
When given an endpoint, only that connection will be flushed. When given an endpoint and database index, only that database for that connection will be flushed.
at line 999
Relay|int|false
dbsize()
Returns the number of keys in the currently-selected database.
at line 1008
Relay|string|false
dump(mixed $key)
Serialize and return the value stored at key in a Redis-specific format.
at line 1018
Relay|bool
replicaof(string|null $host = null, int $port = 0)
Attach or detach the instance as a replica of another instance.
at line 1030
Relay|bool
restore(mixed $key, int $ttl, string $value, array|null $options = null)
Create a key associated with a value that is obtained by deserializing the provided serialized value.
at line 1046
Relay|bool
migrate(string $host, int $port, string|array $key, int $dstdb, int $timeout, bool $copy = false, bool $replace = false, mixed $credentials = null)
Atomically transfer a key from a Redis instance to another one.
at line 1067
Relay|int|false
copy(mixed $src, mixed $dst, array|null $options = null)
This command copies the value stored at the source key to the destination key.
at line 1076
Relay|bool|string
echo(string $arg)
Asks Redis to echo back the provided string.
at line 1085
Relay|bool|string
ping(string $arg = null)
Returns PONG if no argument is provided, otherwise return a copy of the argument as a bulk.
at line 1093
Relay|int|false
idleTime()
Returns the number of milliseoconds since Relay has seen activity from the server.
at line 1101
Relay|string|null|bool
randomkey()
Returns a random key from Redis.
at line 1109
Relay|array|false
time()
Returns the current time from Redis.
at line 1117
Relay|bool
bgrewriteaof()
Asynchronously rewrite the append-only file.
at line 1125
Relay|int|false
lastsave()
Returns the UNIX time stamp of the last successful save to disk.
at line 1134
Relay|bool
bgsave(bool $schedule = false)
Asynchronously save the dataset to disk.
at line 1142
Relay|bool
save()
Synchronously save the dataset to disk.
at line 1150
Relay|array|false
role()
Returns the role of the instance in the context of replication.
at line 1159
Relay|int|false
ttl(mixed $key)
Returns the remaining time to live of a key that has a timeout in seconds.
at line 1168
Relay|int|false
pttl(mixed $key)
Returns the remaining time to live of a key that has a timeout in milliseconds.
at line 1177
Relay|bool|int
exists(mixed ...$keys)
Returns if key(s) exists.
at line 1190
mixed
eval(mixed $script, array $args = [], int $num_keys = 0)
Evaluate script using the Lua interpreter.
at line 1204
mixed
eval_ro(mixed $script, array $args = [], int $num_keys = 0)
Evaluate script using the Lua interpreter. This is just the "read-only" variant of EVAL meaning it can be run on read-only replicas.
at line 1216
mixed
evalsha(string $sha, array $args = [], int $num_keys = 0)
Evaluates a script cached on the server-side by its SHA1 digest.
at line 1228
mixed
evalsha_ro(string $sha, array $args = [], int $num_keys = 0)
Evaluates a script cached on the server-side by its SHA1 digest. This is just the "read-only" variant
of EVALSHA
meaning it can be run on read-only replicas.
at line 1238
mixed
client(string $operation, mixed ...$args)
Executes CLIENT
command operations.
at line 1251
Relay|int|false
geoadd(string $key, float $lng, float $lat, string $member, mixed ...$other_triples_and_options)
Add one or more members to a geospacial sorted set
at line 1269
Relay|float|false
geodist(string $key, string $src, string $dst, string|null $unit = null)
Get the distance between two members of a geospacially encoded sorted set.
at line 1280
Relay|array|false
geohash(string $key, string $member, string ...$other_members)
Retrieve one or more GeoHash encoded strings for members of the set.
at line 1294
mixed
georadius(string $key, float $lng, float $lat, float $radius, string $unit, array $options = [])
Retrieve members of a geospacially sorted set that are within a certain radius of a location.
at line 1307
mixed
georadiusbymember(string $key, string $member, float $radius, string $unit, array $options = [])
Similar to GEORADIUS
except it uses a member as the center of the query.
at line 1320
mixed
georadiusbymember_ro(string $key, string $member, float $radius, string $unit, array $options = [])
Similar to GEORADIUS
except it uses a member as the center of the query.
at line 1334
mixed
georadius_ro(string $key, float $lng, float $lat, float $radius, string $unit, array $options = [])
Retrieve members of a geospacially sorted set that are within a certain radius of a location.
at line 1347
Relay|array
geosearch(string $key, array|string $position, array|int|float $shape, string $unit, array $options = [])
Search a geospacial sorted set for members in various ways.
at line 1368
Relay|int|false
geosearchstore(string $dst, string $src, array|string $position, array|int|float $shape, string $unit, array $options = [])
Search a geospacial sorted set for members within a given area or range, storing the results into a new set.
at line 1384
mixed
get(mixed $key)
Get the value of key.
at line 1394
mixed
getset(mixed $key, mixed $value)
Atomically sets key to value and returns the old value stored at key.
at line 1406
Relay|string|false
getrange(mixed $key, int $start, int $end)
Returns the substring of the string value stored at key, determined by the offsets start and end (both are inclusive).
at line 1418
Relay|int|false
setrange(mixed $key, int $start, mixed $value)
Overwrites part of the string stored at key, starting at the specified offset, for the entire length of value.
at line 1428
Relay|int|false
getbit(mixed $key, int $pos)
Returns the bit value at offset in the string value stored at key.
at line 1440
Relay|int|false
bitcount(mixed $key, int $start = 0, int $end = -1, bool $by_bit = false)
Count the number of set bits (population counting) in a string.
at line 1451
Relay|array|false
bitfield(mixed $key, mixed ...$args)
Perform various bitfield operations on a string key, such as getting/setting bit ranges, incrementing, etc.
at line 1462
Relay|array|bool
config(string $operation, mixed $key = null, string|null $value = null)
This is a container command for runtime configuration commands.
at line 1471
Relay|array|int|false
command(mixed ...$args)
Return an array with details about every Redis command.
at line 1483
Relay|int|false
bitop(string $operation, string $dstkey, string $srckey, string ...$other_keys)
Perform a bitwise operation on one or more keys, storing the result in a new key.
at line 1496
Relay|int|false
bitpos(mixed $key, int $bit, int $start = null, int $end = null, bool $bybit = false)
Return the position of the first bit set to 1 or 0 in a string.
at line 1507
Relay|int|false
setbit(mixed $key, int $pos, int $val)
Sets or clears the bit at offset in the string value stored at key.
at line 1517
mixed
acl(string $cmd, string ...$args)
Interact with Redis' ACLs
at line 1530
Relay|int|false
append(mixed $key, mixed $value)
If key already exists and is a string, this command appends the value at the end of the string. If key does not exist it is created and set as an empty string, so APPEND will be similar to SET in this special case.
at line 1542
mixed
set(mixed $key, mixed $value, mixed $options = null)
Set key to hold the string value. If key already holds a value, it is overwritten, regardless of its type.
at line 1553
mixed
getex(mixed $key, array|null $options = null)
Get the value of key and optionally set its expiration.
GETEX is similar to GET, but is a write command with additional options.
at line 1564
mixed
getdel(mixed $key)
Get the value of key and delete the key. This command is similar to GET, except for the fact that it also deletes the key on success (if and only if the key's value type is a string).
at line 1575
Relay|bool
setex(mixed $key, int $seconds, mixed $value)
Set key to hold the string value and set key to timeout after a given number of seconds.
at line 1585
Relay|int|false
pfadd(string $key, array $elements)
Adds the specified elements to the specified HyperLogLog.
at line 1594
Relay|int|false
pfcount(string $key)
Return the approximated cardinality of the set(s) observed by the HyperLogLog at key(s).
at line 1604
Relay|bool
pfmerge(string $dst, array $srckeys)
Merge given HyperLogLogs into a single one.
at line 1615
Relay|bool
psetex(mixed $key, int $milliseconds, mixed $value)
Set key to hold the string value and set key to timeout after a given number of milliseconds.
at line 1625
Relay|int|false
publish(string $channel, string $message)
Posts a message to the given channel.
at line 1635
mixed
pubsub(string $operation, mixed ...$args)
A container command for Pub/Sub introspection commands.
at line 1645
Relay|int|false
spublish(string $channel, string $message)
Posts a message to the given shard channel.
at line 1657
Relay|bool
setnx(mixed $key, mixed $value)
Set key to hold string value if key does not exist. In that case, it is equal to SET.
When key already holds a value, no operation is performed. SETNX is short for "SET if Not eXists".
at line 1666
Relay|array|false
mget(array $keys)
Returns the values of all specified keys.
at line 1676
Relay|int|false
move(mixed $key, int $db)
Move key from the currently selected database to the specified destination database.
at line 1686
Relay|bool
mset(array $kvals)
Sets the given keys to their respective values.
MSET replaces existing values with new values, just as regular SET.
at line 1696
Relay|bool
msetnx(array $kvals)
Sets the given keys to their respective values.
MSETNX will not perform any operation at all even if just a single key already exists.
at line 1706
Relay|bool
rename(mixed $key, mixed $newkey)
Renames key.
at line 1716
Relay|bool
renamenx(mixed $key, mixed $newkey)
Renames key if the new key does not yet exist.
at line 1725
Relay|int|bool
del(mixed ...$keys)
Removes the specified keys.
at line 1734
Relay|int|false
unlink(mixed ...$keys)
Removes the specified keys without blocking Redis.
at line 1745
Relay|bool
expire(mixed $key, int $seconds, string|null $mode = null)
Set a timeout on key.
at line 1755
Relay|bool
pexpire(mixed $key, int $milliseconds)
Set a key's time to live in milliseconds.
at line 1765
Relay|bool
expireat(mixed $key, int $timestamp)
Set a timeout on key using a unix timestamp.
at line 1776
Relay|int|false
expiretime(mixed $key)
Returns the absolute Unix timestamp in seconds at which the given key will expire.
If the key exists but doesn't have a TTL this function return -1. If the key does not exist -2.
at line 1786
Relay|bool
pexpireat(mixed $key, int $timestamp_ms)
Set the expiration for a key as a UNIX timestamp specified in milliseconds.
at line 1796
Relay|int|false
pexpiretime(mixed $key)
Semantic the same as EXPIRETIME, but returns the absolute Unix expiration timestamp in milliseconds instead of seconds.
at line 1805
Relay|bool
persist(mixed $key)
Remove the existing timeout on key, turning the key from volatile to persistent.
at line 1818
Relay|int|string|bool
type(mixed $key)
Returns the type of a given key.
In PhpRedis compatibility mode this will return an integer
(one of the REDIS_
at line 1832
Relay|string|null|false
lmove(mixed $srckey, mixed $dstkey, string $srcpos, string $dstpos)
Atomically returns and removes the first/last element of the list stored at source, and pushes the element at the first/last element of the list stored at destination.
at line 1847
Relay|string|null|false
blmove(mixed $srckey, mixed $dstkey, string $srcpos, string $dstpos, float $timeout)
BLMOVE is the blocking variant of LMOVE. When source contains elements, this command behaves exactly like LMOVE. When used inside a MULTI/EXEC block, this command behaves exactly like LMOVE.
at line 1858
Relay|array|false
lrange(mixed $key, int $start, int $stop)
Returns the specified elements of the list stored at key.
at line 1869
Relay|int|false
lpush(mixed $key, mixed $mem, mixed ...$mems)
Insert all the specified values at the head of the list stored at key.
at line 1880
Relay|int|false
rpush(mixed $key, mixed $mem, mixed ...$mems)
Insert all the specified values at the tail of the list stored at key.
at line 1892
Relay|int|false
lpushx(mixed $key, mixed $mem, mixed ...$mems)
Inserts specified values at the head of the list stored at key, only if key already exists and holds a list.
at line 1904
Relay|int|false
rpushx(mixed $key, mixed $mem, mixed ...$mems)
Inserts specified values at the tail of the list stored at key, only if key already exists and holds a list.
at line 1915
Relay|bool
lset(mixed $key, int $index, mixed $mem)
Sets the list element at index to element.
at line 1925
mixed
lpop(mixed $key, int $count = 1)
Removes and returns the first elements of the list stored at key.
at line 1936
Relay|int|array|false|null
lpos(mixed $key, mixed $value, array|null $options = null)
The command returns the index of matching elements inside a Redis list.
at line 1946
mixed
rpop(mixed $key, int $count = 1)
Removes and returns the last elements of the list stored at key.
at line 1957
mixed
rpoplpush(mixed $source, mixed $dest)
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.
at line 1970
mixed
brpoplpush(mixed $source, mixed $dest, float $timeout)
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.
This command will block for an element up to the provided timeout.
at line 1982
Relay|array|null|false
blpop(string|array $key, string|float $timeout_or_key, mixed ...$extra_args)
BLPOP is a blocking list pop primitive. It is the blocking version of LPOP because it blocks the connection when there are no elements to pop from any of the given lists.
at line 1994
Relay|array|null|false
blmpop(float $timeout, array $keys, string $from, int $count = 1)
Pop elements from a list, or block until one is available
at line 2006
Relay|array|null|false
bzmpop(float $timeout, array $keys, string $from, int $count = 1)
Remove and return members with scores in a sorted set or block until one is available
at line 2017
Relay|array|null|false
lmpop(array $keys, string $from, int $count = 1)
Pops one or more elements from the first non-empty list key from the list of provided key names.
at line 2029
Relay|array|null|false
zmpop(array $keys, string $from, int $count = 1)
Pops one or more elements, that are member-score pairs, from the first non-empty sorted set in the provided list of key names.
at line 2041
Relay|array|null|false
brpop(string|array $key, string|float $timeout_or_key, mixed ...$extra_args)
BRPOP is a blocking list pop primitive. It is the blocking version of RPOP because it blocks the connection when there are no elements to pop from any of the given lists.
at line 2052
Relay|array|null|false
bzpopmax(string|array $key, string|float $timeout_or_key, mixed ...$extra_args)
BZPOPMAX is the blocking variant of the sorted set ZPOPMAX primitive.
at line 2063
Relay|array|null|false
bzpopmin(string|array $key, string|float $timeout_or_key, mixed ...$extra_args)
BZPOPMIN is the blocking variant of the sorted set ZPOPMIN primitive.
at line 2073
mixed
object(string $op, mixed $key)
This is a container command for object introspection commands.
at line 2084
Relay|array|false
geopos(mixed $key, mixed ...$members)
Return the positions (longitude,latitude) of all the specified members of the geospatial index represented by the sorted set at key.
at line 2095
Relay|int|false
lrem(mixed $key, mixed $mem, int $count = 0)
Removes the first count occurrences of elements equal to element from the list stored at key.
at line 2105
mixed
lindex(mixed $key, int $index)
Returns the element at index index in the list stored at key.
at line 2117
Relay|int|false
linsert(mixed $key, string $op, mixed $pivot, mixed $element)
Inserts element in the list stored at key either before or after the reference value pivot.
at line 2128
Relay|bool
ltrim(mixed $key, int $start, int $end)
Trim an existing list so that it will contain only the specified range of elements specified.
at line 2138
mixed
hget(mixed $hash, mixed $member)
Returns the value associated with field in the hash stored at key.
at line 2148
Relay|int|false
hstrlen(mixed $hash, mixed $member)
Returns the string length of the value associated with field in the hash stored at key.
at line 2157
Relay|array|false
hgetall(mixed $hash)
Returns all fields and values of the hash stored at key.
at line 2166
Relay|array|false
hkeys(mixed $hash)
Returns all field names in the hash stored at key.
at line 2175
Relay|array|false
hvals(mixed $hash)
Returns all values in the hash stored at key.
at line 2185
Relay|array|false
hmget(mixed $hash, array $members)
Returns the values associated with the specified fields in the hash stored at key.
at line 2195
Relay|array|string|false
hrandfield(mixed $hash, array|null $options = null)
When called with just the key argument, return a random field from the hash value stored at key.
at line 2205
Relay|bool
hmset(mixed $hash, array $members)
Sets the specified fields to their respective values in the hash stored at key.
at line 2215
Relay|bool
hexists(mixed $hash, mixed $member)
Returns if field is an existing field in the hash stored at key.
at line 2226
Relay|bool
hsetnx(mixed $hash, mixed $member, mixed $value)
Sets field in the hash stored at key to value, only if field does not yet exist.
at line 2238
Relay|int|false
hset(mixed $key, mixed $mem, mixed $val, mixed ...$kvals)
Sets field in the hash stored at key to value.
at line 2249
Relay|int|false
hdel(mixed $key, mixed $mem, string ...$mems)
Removes the specified fields from the hash stored at key.
at line 2260
Relay|int|false
hincrby(mixed $key, mixed $mem, int $value)
Increments the number stored at field in the hash stored at key by increment.
at line 2272
Relay|float|bool
hincrbyfloat(mixed $key, mixed $mem, float $value)
Increment the specified field of a hash stored at key, and representing a floating point number, by the specified increment.
at line 2282
Relay|int|false
incr(mixed $key, int $by = 1)
Increments the number stored at key by one.
at line 2292
Relay|int|false
decr(mixed $key, int $by = 1)
Decrements the number stored at key by one.
at line 2302
Relay|int|false
incrby(mixed $key, int $value)
Increments the number stored at key by increment.
at line 2312
Relay|int|false
decrby(mixed $key, int $value)
Decrements the number stored at key by decrement.
at line 2322
Relay|float|false
incrbyfloat(mixed $key, float $value)
Increment the string representing a floating point number stored at key by the specified increment.
at line 2332
Relay|array|false
sdiff(mixed $key, mixed ...$other_keys)
Returns the members of the set resulting from the difference between the first set and all the successive sets.
at line 2343
Relay|int|false
sdiffstore(mixed $key, mixed ...$other_keys)
This command is equal to SDIFF, but instead of returning the resulting set, it is stored in destination.
If destination already exists, it is overwritten.
at line 2353
Relay|array|false
sinter(mixed $key, mixed ...$other_keys)
Returns the members of the set resulting from the intersection of all the given sets.
at line 2363
Relay|int|false
sintercard(array $keys, int $limit = -1)
Intersect multiple sets and return the cardinality of the result.
at line 2374
Relay|int|false
sinterstore(mixed $key, mixed ...$other_keys)
This command is equal to SINTER, but instead of returning the resulting set, it is stored in destination.
If destination already exists, it is overwritten.
at line 2384
Relay|array|false
sunion(mixed $key, mixed ...$other_keys)
Returns the members of the set resulting from the union of all the given sets.
at line 2395
Relay|int|false
sunionstore(mixed $key, mixed ...$other_keys)
This command is equal to SUNION, but instead of returning the resulting set, it is stored in destination.
If destination already exists, it is overwritten.
at line 2405
bool
subscribe(array $channels, callable $callback)
Subscribes to the specified channels.
at line 2414
bool
unsubscribe(array $channels = [])
Unsubscribes from the given channels, or from all of them if none is given.
at line 2424
bool
psubscribe(array $patterns, callable $callback)
Subscribes to the given patterns.
at line 2433
bool
punsubscribe(array $patterns = [])
Unsubscribes from the given patterns, or from all of them if none is given.
at line 2443
bool
ssubscribe(array $channels, callable $callback)
Subscribes to the specified shard channels.
at line 2452
bool
sunsubscribe(array $channels = [])
Unsubscribes from the given shard channels, or from all of them if none is given.
at line 2462
Relay|int|false
touch(array|string $key_or_array, mixed ...$more_keys)
Alters the last access time of a key(s).
at line 2470
Relay|bool
pipeline()
A pipeline block is simply transmitted faster to the server (like MULTI
), but without any guarantee of atomicity.
at line 2481
Relay|bool
multi(int $mode = 0)
Marks the start of a transaction block. Subsequent commands will be queued for atomic execution using EXEC.
Accepts Relay::MULTI
and Relay::PIPELINE
modes.
at line 2489
Relay|array|bool
exec()
Executes all previously queued commands in a transaction and restores the connection state to normal.
at line 2500
Relay|int|false
wait(int $replicas, int $timeout)
Wait for the synchronous replication of all the write commands sent in the context of the current connection.
at line 2510
Relay|bool
watch(mixed $key, mixed ...$other_keys)
Marks the given keys to be watched for conditional execution of a transaction.
at line 2519
Relay|bool
unwatch()
Flushes all the previously watched keys for a transaction.
If you call EXEC or DISCARD, there's no need to manually call UNWATCH.
at line 2528
bool
discard()
Flushes all previously queued commands in a transaction and restores the connection state to normal.
If WATCH was used, DISCARD unwatches all keys watched by the connection.
at line 2538
int
getMode(bool $masked = false)
Get the mode Relay is currently in.
Relay::ATOMIC
, Relay::PIPELINE
or Relay::MULTI
.
at line 2546
void
clearBytes()
Clear the accumulated sent and received bytes.
at line 2558
array|false
scan(mixed $iterator, mixed $match = null, int $count = 0, string|null $type = null)
Scan the keyspace for matching keys.
at line 2570
array|false
hscan(mixed $key, mixed $iterator, mixed $match = null, int $count = 0)
Iterates fields of Hash types and their associated values.
at line 2582
array|false
sscan(mixed $key, mixed $iterator, mixed $match = null, int $count = 0)
Iterates elements of Sets types.
at line 2594
array|false
zscan(mixed $key, mixed $iterator, mixed $match = null, int $count = 0)
Iterates elements of Sorted Set types and their associated scores.
at line 2603
Relay|array|false
keys(mixed $pattern)
Returns all keys matching pattern.
at line 2613
Relay|array|int|bool
slowlog(string $operation, string ...$extra_args)
Interact with the Redis slowlog.
at line 2622
Relay|array|false
smembers(mixed $set)
Returns all the members of the set value stored at $key
.
at line 2632
Relay|bool
sismember(mixed $set, mixed $member)
Returns if $member
is a member of the set stored at $key
.
at line 2642
Relay|array|false
smismember(mixed $set, mixed ...$members)
Returns whether each member is a member of the set stored at $key
.
at line 2653
Relay|int|false
srem(mixed $set, mixed $member, mixed ...$members)
Remove the specified members from the set stored at $key
.
at line 2664
Relay|int|false
sadd(mixed $set, mixed $member, mixed ...$members)
Add the specified members to the set stored at $key
.
at line 2674
Relay|array|int|false
sort(mixed $key, array $options = [])
Sort the elements in a list, set or sorted set.
at line 2684
Relay|array|false
sort_ro(mixed $key, array $options = [])
Sort the elements in a list, set or sorted set. Read-only variant of SORT.
at line 2695
Relay|bool
smove(mixed $srcset, mixed $dstset, mixed $member)
Move member from the set at source to the set at destination.
at line 2705
mixed
spop(mixed $set, int $count = 1)
Removes and returns one or more random members from the set value store at $key
.
at line 2715
mixed
srandmember(mixed $set, int $count = 1)
Returns one or multiple random members from a set.
at line 2724
Relay|int|false
scard(mixed $key)
Returns the set cardinality (number of elements) of the set stored at $key
.
at line 2734
mixed
script(string $command, string ...$args)
Execute a script management command.
at line 2743
Relay|int|false
strlen(mixed $key)
Returns the length of the string value stored at $key
.
at line 2752
Relay|int|false
hlen(mixed $key)
Returns the number of fields contained in the hash stored at $key
.
at line 2761
Relay|int|false
llen(mixed $key)
Returns the length of the list stored at $key
.
at line 2772
Relay|int|false
xack(mixed $key, string $group, array $ids)
Acknowledge one or more IDs as having been processed by the consumer group.
at line 2785
Relay|string|false
xadd(string $key, string $id, array $values, int $maxlen = 0, bool $approx = false, bool $nomkstream = false)
Append a message to a stream.
at line 2805
Relay|array|bool
xclaim(string $key, string $group, string $consumer, int $min_idle, array $ids, array $options)
Claim ownership of stream message(s).
at line 2827
Relay|bool|array
xautoclaim(string $key, string $group, string $consumer, int $min_idle, string $start, int $count = -1, bool $justid = false)
Automatically take ownership of stream message(s) by metrics
at line 2844
Relay|int|false
xlen(string $key)
Get the length of a stream.
at line 2858
mixed
xgroup(string $operation, mixed $key = null, string $group = null, string $id_or_consumer = null, bool $mkstream = false, int $entries_read = -2)
Perform utility operations having to do with consumer groups
at line 2875
Relay|int|false
xdel(string $key, array $ids)
Remove one or more specific IDs from a stream.
at line 2887
mixed
xinfo(string $operation, string|null $arg1 = null, string|null $arg2 = null, int $count = -1)
Retrieve information about a stream key.
at line 2902
Relay|array|false
xpending(string $key, string $group, string|null $start = null, string|null $end = null, int $count = -1, string|null $consumer = null, int $idle = 0)
Query pending entries in a stream.
at line 2922
Relay|array|false
xrange(mixed $key, string $start, string $end, int $count = -1)
Lists elements in a stream.
at line 2934
Relay|array|bool
xrevrange(string $key, string $end, string $start, int $count = -1)
Get a range of entries from a STREAM ke in reverse chronological order.
at line 2945
Relay|array|bool|null
xread(array $streams, int $count = -1, int $block = -1)
Read messages from a stream.
at line 2958
Relay|array|bool|null
xreadgroup(string $group, string $consumer, array $streams, int $count = 1, int $block = 1)
Read messages from a stream using a consumer group.
at line 2977
Relay|int|false
xtrim(string $key, string $threshold, bool $approx = false, bool $minid = false, int $limit = -1)
Truncate a STREAM key in various ways.
at line 2993
mixed
zadd(mixed $key, mixed ...$args)
Adds all the specified members with the specified scores to the sorted set stored at key.
at line 3004
mixed
zrandmember(mixed $key, array|null $options = null)
When called with just the key argument, return a random element from the sorted set value stored at key.
If the provided count argument is positive, return an array of distinct elements.
at line 3016
Relay|array|false
zrange(mixed $key, string $start, string $end, mixed $options = null)
Returns the specified range of elements in the sorted set stored at key.
at line 3028
Relay|array|false
zrevrange(mixed $key, int $start, int $end, mixed $options = null)
Returns the specified range of elements in the sorted set stored at key.
at line 3041
Relay|array|false
zrangebyscore(mixed $key, mixed $start, mixed $end, mixed $options = null)
Returns all the elements in the sorted set at key with a score between min and max (including elements with score equal to min or max).
at line 3054
Relay|array|false
zrevrangebyscore(mixed $key, mixed $start, mixed $end, mixed $options = null)
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).
at line 3068
Relay|int|false
zrangestore(mixed $dst, mixed $src, mixed $start, mixed $end, mixed $options = null)
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).
at line 3083
Relay|array|false
zrangebylex(mixed $key, mixed $min, mixed $max, int $offset = -1, int $count = -1)
When all the elements in a sorted set are inserted with the same score, in order to force lexicographical ordering, this command returns all the elements in the sorted set at key with a value between min and max.
at line 3098
Relay|array|false
zrevrangebylex(mixed $key, mixed $max, mixed $min, int $offset = -1, int $count = -1)
When all the elements in a sorted set are inserted with the same score, in order to force lexicographical ordering, this command returns all the elements in the sorted set at key with a value between max and min.
at line 3111
Relay|array|int|false
zrank(mixed $key, mixed $rank, bool $withscore = false)
Returns the rank of member in the sorted set stored at key, with the scores ordered from low to high. The rank (or index) is 0-based, which means that the member with the lowest score has rank 0.
at line 3124
Relay|array|int|false
zrevrank(mixed $key, mixed $rank, bool $withscore = false)
Returns the rank of member in the sorted set stored at key, with the scores ordered from high to low. The rank (or index) is 0-based, which means that the member with the highest score has rank 0.
at line 3135
Relay|int|false
zrem(mixed $key, mixed ...$args)
Removes the specified members from the sorted set stored at key.
Non existing members are ignored.
at line 3149
Relay|int|false
zremrangebylex(mixed $key, mixed $min, mixed $max)
When all the elements in a sorted set are inserted with the same score, in order to force lexicographical ordering, this command removes all elements in the sorted set stored at key between the lexicographical range specified by min and max.
at line 3162
Relay|int|false
zremrangebyrank(mixed $key, int $start, int $end)
Removes all elements in the sorted set stored at key with rank between start and stop. Both start and stop are 0 -based indexes with 0 being the element with the lowest score.
at line 3174
Relay|int|false
zremrangebyscore(mixed $key, mixed $min, mixed $max)
Removes all elements in the sorted set stored at key with a score between min and max (inclusive).
at line 3183
Relay|int|false
zcard(mixed $key)
Returns the sorted set cardinality (number of elements) of the sorted set stored at key.
at line 3194
Relay|int|false
zcount(mixed $key, mixed $min, mixed $max)
Returns the number of elements in the sorted set at key with a score between min and max.
at line 3205
Relay|array|false
zdiff(array $keys, array|null $options = null)
This command is similar to ZDIFFSTORE, but instead of storing the resulting sorted set, it is returned to the client.
at line 3216
Relay|int|false
zdiffstore(mixed $dst, array $keys)
Computes the difference between the first and all successive input sorted sets and stores the result in destination.
at line 3227
Relay|float|false
zincrby(mixed $key, float $score, mixed $mem)
Increments the score of member in the sorted set stored at key by increment.
at line 3240
Relay|int|false
zlexcount(mixed $key, mixed $min, mixed $max)
When all the elements in a sorted set are inserted with the same score, in order to force lexicographical ordering, this command returns the number of elements in the sorted set at key with a value between min and max.
at line 3250
Relay|array|false
zmscore(mixed $key, mixed ...$mems)
Returns the scores associated with the specified members in the sorted set stored at key.
at line 3260
Relay|float|false
zscore(mixed $key, mixed $member)
Returns the score of member in the sorted set at key.
at line 3272
Relay|array|false
zinter(array $keys, array|null $weights = null, mixed $options = null)
This command is similar to ZINTERSTORE, but instead of storing the resulting sorted set, it is returned to the client.
at line 3282
Relay|int|false
zintercard(array $keys, int $limit = -1)
Intersect multiple sorted sets and return the cardinality of the result.
at line 3295
Relay|int|false
zinterstore(mixed $dst, array $keys, array|null $weights = null, mixed $options = null)
Computes the intersection of numkeys sorted sets given by the specified keys, and stores the result in destination.
at line 3307
Relay|array|false
zunion(array $keys, array|null $weights = null, mixed $options = null)
This command is similar to ZUNIONSTORE, but instead of storing the resulting sorted set, it is returned to the client.
at line 3320
Relay|int|false
zunionstore(mixed $dst, array $keys, array|null $weights = null, mixed $options = null)
Computes the union of numkeys sorted sets given by the specified keys, and stores the result in destination.
at line 3331
Relay|array|false
zpopmin(mixed $key, int $count = 1)
Removes and returns up to count members with the lowest scores in the sorted set stored at key.
at line 3342
Relay|array|false
zpopmax(mixed $key, int $count = 1)
Removes and returns up to count members with the highest scores in the sorted set stored at key.
at line 3351
mixed
_getKeys()
internal | Temporary debug helper. Do not use. |
Returns keys cached in runtime memory.
at line 3359
static array
license()
Returns information about the license.