PhpRedisClusterConnection
class PhpRedisClusterConnection extends PhpRedisConnection
Redis Cluster connection using phpredis RedisCluster client.
Traits
Constants
| private CONNECTION_LEVEL_PHPREDIS_OPTIONS |
Top-level connection config keys that should be applied through setOption. |
| private SCAN_CURSOR_PREFIX |
Prefix marking an encoded all-master scan cursor. |
| private NON_THROWING_ERROR_PREFIXES |
Error reply prefixes that standalone phpredis exposes as false. |
Properties
| protected float | $lastUseTime | from Connection | |
| protected float | $lastReleaseTime | from Connection | |
| protected bool | $invalid | from Connection | |
| static protected array | $macros | The registered string macros. |
from Macroable |
| protected Redis|RedisCluster|null | $connection | from RedisConnection | |
| protected float | $createdAt | from RedisConnection | |
| protected float|null | $lifetimeExpiresAt | from RedisConnection | |
| protected bool | $availableForReuse | from RedisConnection | |
| protected Dispatcher|null | $eventDispatcher | from RedisConnection | |
| protected array | $config | from RedisConnection | |
| protected int|null | $database | Current redis database. |
from RedisConnection |
| protected bool | $watching | Determine if the native connection is watching keys. |
from RedisConnection |
| protected bool | $shouldTransform | Determine if the connection calls should be transformed to Laravel style. |
from RedisConnection |
| protected string|array|null | $defaultNode | The default node to use from the cluster. |
Methods
Create a new PhpRedis connection instance.
Mix another object into the class.
Dynamically handle calls to the class.
Dynamically handle calls to the class.
Reconnect to Redis Cluster.
Set configured options on a Redis or RedisCluster client.
Get the phpredis options configured on the connection.
Resolve a phpredis option name to its native option constant.
Parse a friendly phpredis backoff algorithm name.
Check the Redis client for heartbeat health.
Clear the tracked watch state after callback-form transaction completion.
Determine if this connection has been idle long enough to be evicted.
Determine if this connection generation has reached its maximum lifetime.
Determine whether a failed command left the connection unsafe to reuse.
Determine if the underlying Redis Cluster client is in pipeline/multi mode.
Determine if the connection is to a Redis Cluster.
Determine if the given key contains a Redis Cluster hash tag.
Ping Redis for heartbeat health without shadowing the public Redis PING command.
Log a redis connection message.
Determine if the connection calls should be transformed to Laravel style.
Set the string value in the argument as the value of the key.
Set the given key if it doesn't exist.
Prepare arguments for the hmget command.
Get the value of the given hash fields.
Prepare arguments for the hmset command.
Set the given hash fields to their respective values.
Set the given hash field if it doesn't exist.
Removes the first count occurrences of the value element from the list.
Removes and returns the first element of the list stored at key.
Removes and returns the last element of the list stored at key.
Removes and returns random elements from the set value at key.
Prepare arguments for the xautoclaim command.
Claim pending stream entries that have been idle long enough.
Prepare arguments for the xgroup command.
Prepare arguments for the xpending command.
Get pending entries in a stream consumer group.
Prepare arguments for the xrange command.
Get stream entries within the given ID range.
Prepare arguments for the xrevrange command.
Get stream entries within the given ID range in reverse order.
Prepare arguments for the xtrim command.
Trim a stream by its length or minimum ID.
Add one or more members to a sorted set or update its score if it already exists.
Prepare arguments for the zcount command.
Count sorted set members within the given score range.
Prepare arguments for the zremrangebyscore command.
Remove sorted set members within the given score range.
Prepare arguments for the zrangebyscore command.
Return elements with score between $min and $max.
Prepare arguments for the zrevrangebyscore command.
Return elements with score between $max and $min in reverse order.
Prepare arguments for the zinterstore command.
Find the intersection between sets and store in a new set.
Prepare arguments for the zunionstore command.
Find the union between sets and store in a new set.
Scan all keys based on the given options.
Scan the given set for all values based on options.
Execute the transformed ZSCAN command.
Scan the given hash for all values based on options.
Execute the transformed HSCAN command.
Scan the given set for all values based on options.
Execute the transformed SSCAN command.
Evaluate a script and preserve standalone phpredis error semantics.
Prepare arguments for the evalsha command.
Evaluate a script through the topology-aware SHA cache.
Prepare a raw command for the node owning its first argument.
Execute a raw command against the node owning its first argument.
Reject subscriptions on raw pooled connections.
Determine if a custom serializer is configured on the connection.
Execute the given callback without prefixing scan patterns.
Execute the given callback without serialization or compression.
Execute a Lua script using evalSha with automatic fallback to eval.
Create an exception that preserves standalone phpredis semantics.
Normalize RedisCluster's null representation of RESP nil replies.
Safely scan the Redis keyspace for keys matching a pattern.
Flush (delete) all Redis keys matching a pattern.
Set the value of a key
Set hash field if not exists
Set hash field values
Blocking left pop from list
Blocking right pop from list
Remove members from set
Add members to sorted set
Count sorted set members by score range
Get sorted set members by score range
No description
Intersect sorted sets
Union sorted sets
Evaluate Lua script
Evaluate Lua script by SHA1
Execute commands in a pipeline
Delete hash fields
Remove sorted set members
No description
No description
No description
No description
Blocking left pop from list
Blocking right pop from list
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
Delete hash fields
No description
No description
No description
No description
No description
No description
No description
Set hash field values
Set hash field if not exists
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
Remove members from set
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
Add members to sorted set
Count sorted set members by score range
No description
No description
No description
Get sorted set members by score range
No description
No description
Remove sorted set members
No description
No description
No description
No description
No description
No description
No description
Flush the selected Redis database on all master nodes.
Format the host using the scheme if available.
Normalize the SSL context for a standalone Redis connection.
Get the master nodes in the cluster.
Get server information from the default Cluster node.
Ping the default Cluster node.
Determine whether standalone phpredis throws a Redis error reply.
Create a Redis Cluster connection.
Normalize the SSL context for a Redis Cluster connection.
Format the password for the RedisCluster constructor.
Details
in
PhpRedisConnection at line 26
__construct(Container $container, ConnectionPool $pool, array $config)
Create a new PhpRedis connection instance.
in
RedisConnection at line 782
void
release()
Release the connection back to pool.
in
Connection at line 99
void
discard()
Discard the connection from its pool.
in
Connection at line 107
mixed
getConnection()
Get the underlying connection.
in
RedisConnection at line 491
bool
check()
Check if the connection is still valid.
in
Connection at line 134
float
getLastUseTime()
Get the last use time.
in
Connection at line 142
float
getLastReleaseTime()
Get the last release time.
in
Connection at line 150
protected void
markInvalid()
Mark the connection as invalid.
in
Connection at line 158
protected void
markValid()
Mark the connection as valid.
in
RedisConnection at line 473
mixed
getActiveConnection()
Get the active connection.
in
Macroable at line 28
static void
macro(string $name, callable|object $macro)
Register a custom macro.
Boot-only. Macros persist in a static property for the worker lifetime and apply to every subsequent call on the macroable class.
in
Macroable at line 41
static void
mixin(object $mixin, bool $replace = true)
Mix another object into the class.
Boot-only. Delegates to macro() for each method; registered macros persist in a static property for the worker lifetime.
in
Macroable at line 57
static bool
hasMacro(string $name)
Check if macro is registered.
in
Macroable at line 68
static void
flushMacros()
Flush the existing macros.
Boot or tests only. Clears worker-wide macros; concurrent coroutines may resolve different methods depending on timing.
in
Macroable at line 78
static mixed
__callStatic(string $method, array $parameters)
Dynamically handle calls to the class.
in
Macroable at line 103
mixed
__call(string $method, array $parameters)
Dynamically handle calls to the class.
in
RedisConnection at line 524
void
invalidate()
| internal |
Mark the connection invalid before its next use.
in
RedisConnection at line 532
string
getName()
Get the connection name.
in
RedisConnection at line 540
Dispatcher|null
getEventDispatcher()
Get the event dispatcher instance.
at line 46
bool
reconnect()
Reconnect to Redis Cluster.
in
RedisConnection at line 556
protected void
markReconnected()
Mark the underlying Redis client as freshly connected.
in
RedisConnection at line 570
protected void
setOptions(Redis|RedisCluster $redis)
Set configured options on a Redis or RedisCluster client.
in
RedisConnection at line 613
protected array
configuredPhpRedisOptions()
Get the phpredis options configured on the connection.
in
RedisConnection at line 633
protected int
phpRedisOption(string $name)
Resolve a phpredis option name to its native option constant.
in
RedisConnection at line 659
protected int
parseBackoffAlgorithm(mixed $algorithm)
Parse a friendly phpredis backoff algorithm name.
in
RedisConnection at line 688
bool
close()
Close the current connection.
Calling the native phpredis close() releases the underlying socket deterministically rather than relying on PHP refcount destruction - connections trapped in pool/connection reference cycles would otherwise keep their FDs open until the cycle collector runs.
in
RedisConnection at line 714
bool
heartbeatCheck(float $timeout)
Check the Redis client for heartbeat health.
in
RedisConnection at line 928
bool|Redis
discardTransaction()
Execute the native Redis DISCARD command.
Use this method on a held connection because discard() removes the connection from its pool.
in
RedisConnection at line 944
void
clearWatchState()
| internal |
Clear the tracked watch state after callback-form transaction completion.
in
RedisConnection at line 952
bool
isIdleExpired(float|null $now = null)
Determine if this connection has been idle long enough to be evicted.
in
RedisConnection at line 967
float
getCreatedAt()
Get the connection generation creation time.
in
RedisConnection at line 975
bool
isLifetimeExpired(float|null $now = null)
Determine if this connection generation has reached its maximum lifetime.
in
RedisConnection at line 987
protected bool
shouldInvalidateAfter(RedisException|RedisClusterException|ErrorException $exception)
Determine whether a failed command left the connection unsafe to reuse.
at line 78
protected bool
isQueueingMode()
Determine if the underlying Redis Cluster client is in pipeline/multi mode.
at line 70
bool
isCluster()
Determine if the connection is to a Redis Cluster.
in
RedisConnection at line 1030
static bool
hasHashTag(string $key)
Determine if the given key contains a Redis Cluster hash tag.
in
RedisConnection at line 1046
protected bool
pingForHeartbeat()
Ping Redis for heartbeat health without shadowing the public Redis PING command.
in
RedisConnection at line 1085
protected void
log(string $message, string $level = LogLevel::WARNING)
Log a redis connection message.
in
RedisConnection at line 1095
RedisConnection
shouldTransform(bool $shouldTransform = true)
Determine if the connection calls should be transformed to Laravel style.
in
RedisConnection at line 1105
bool
getShouldTransform()
Get the current transformation state.
in
RedisConnection at line 1113
protected mixed
callGet(string $key)
Returns the value of the given key.
in
RedisConnection at line 1123
protected array|false
callMget(array $keys)
Get the values of all the given keys.
in
RedisConnection at line 1146
protected array
prepareSet(mixed ...$arguments)
Prepare arguments for the set command.
in
RedisConnection at line 1159
protected mixed
callSet(string $key, mixed $value, mixed $expireResolution = null, int|null $expireTTL = null, string|null $flag = null)
Set the string value in the argument as the value of the key.
in
RedisConnection at line 1170
protected int
callSetnx(string $key, mixed $value)
Set the given key if it doesn't exist.
in
RedisConnection at line 1180
protected array
prepareHmget(mixed ...$arguments)
Prepare arguments for the hmget command.
in
RedisConnection at line 1191
protected array|false
callHmget(string $key, mixed ...$dictionary)
Get the value of the given hash fields.
in
RedisConnection at line 1209
protected array
prepareHmset(mixed ...$arguments)
Prepare arguments for the hmset command.
in
RedisConnection at line 1227
protected bool
callHmset(string $key, mixed ...$dictionary)
Set the given hash fields to their respective values.
in
RedisConnection at line 1237
protected int
callHsetnx(string $hash, string $key, mixed $value)
Set the given hash field if it doesn't exist.
in
RedisConnection at line 1247
protected array
prepareLrem(mixed ...$arguments)
Prepare arguments for the lrem command.
in
RedisConnection at line 1257
protected false|int
callLrem(string $key, int $count, mixed $value)
Removes the first count occurrences of the value element from the list.
in
RedisConnection at line 1267
protected array|null
callBlpop(mixed ...$arguments)
Removes and returns the first element of the list stored at key.
in
RedisConnection at line 1277
protected array|null
callBrpop(mixed ...$arguments)
Removes and returns the last element of the list stored at key.
in
RedisConnection at line 1290
protected mixed
callSpop(string $key, int|null $count = null)
Removes and returns random elements from the set value at key.
When called without count, returns a single element (string|false). When called with count, returns an array of elements.
in
RedisConnection at line 1324
protected array
prepareXadd(mixed ...$arguments)
Prepare arguments for the xadd command.
in
RedisConnection at line 1332
protected false|string
callXadd(mixed ...$arguments)
Add an entry to a stream.
in
RedisConnection at line 1344
protected array
prepareXautoclaim(mixed ...$arguments)
Prepare arguments for the xautoclaim command.
in
RedisConnection at line 1352
protected array|bool
callXautoclaim(mixed ...$arguments)
Claim pending stream entries that have been idle long enough.
in
RedisConnection at line 1364
protected array
prepareXgroup(mixed ...$arguments)
Prepare arguments for the xgroup command.
in
RedisConnection at line 1372
protected mixed
callXgroup(mixed ...$arguments)
Manage stream consumer groups.
in
RedisConnection at line 1384
protected array
prepareXpending(mixed ...$arguments)
Prepare arguments for the xpending command.
in
RedisConnection at line 1392
protected array|false
callXpending(mixed ...$arguments)
Get pending entries in a stream consumer group.
in
RedisConnection at line 1404
protected array
prepareXrange(mixed ...$arguments)
Prepare arguments for the xrange command.
in
RedisConnection at line 1412
protected array|bool
callXrange(mixed ...$arguments)
Get stream entries within the given ID range.
in
RedisConnection at line 1424
protected array
prepareXrevrange(mixed ...$arguments)
Prepare arguments for the xrevrange command.
in
RedisConnection at line 1432
protected array|bool
callXrevrange(mixed ...$arguments)
Get stream entries within the given ID range in reverse order.
in
RedisConnection at line 1444
protected array
prepareXtrim(mixed ...$arguments)
Prepare arguments for the xtrim command.
in
RedisConnection at line 1452
protected false|int
callXtrim(mixed ...$arguments)
Trim a stream by its length or minimum ID.
in
RedisConnection at line 1464
protected array
prepareZadd(mixed ...$arguments)
Prepare arguments for the zadd command.
in
RedisConnection at line 1492
protected false|float|int
callZadd(string $key, mixed ...$dictionary)
Add one or more members to a sorted set or update its score if it already exists.
in
RedisConnection at line 1504
protected array
prepareZcount(mixed ...$arguments)
Prepare arguments for the zcount command.
in
RedisConnection at line 1512
protected false|int
callZcount(mixed ...$arguments)
Count sorted set members within the given score range.
in
RedisConnection at line 1524
protected array
prepareZremrangebyscore(mixed ...$arguments)
Prepare arguments for the zremrangebyscore command.
in
RedisConnection at line 1532
protected false|int
callZremrangebyscore(mixed ...$arguments)
Remove sorted set members within the given score range.
in
RedisConnection at line 1544
protected array
prepareZrangebyscore(mixed ...$arguments)
Prepare arguments for the zrangebyscore command.
in
RedisConnection at line 1562
protected array|false
callZrangebyscore(string $key, float|int|string $min, float|int|string $max, array $options = [])
Return elements with score between $min and $max.
in
RedisConnection at line 1574
protected array
prepareZrevrangebyscore(mixed ...$arguments)
Prepare arguments for the zrevrangebyscore command.
in
RedisConnection at line 1592
protected array|false
callZrevrangebyscore(string $key, float|int|string $max, float|int|string $min, array $options = [])
Return elements with score between $max and $min in reverse order.
in
RedisConnection at line 1604
protected array
prepareZinterstore(mixed ...$arguments)
Prepare arguments for the zinterstore command.
in
RedisConnection at line 1615
protected false|int
callZinterstore(string $output, array $keys, array $options = [])
Find the intersection between sets and store in a new set.
in
RedisConnection at line 1627
protected array
prepareZunionstore(mixed ...$arguments)
Prepare arguments for the zunionstore command.
in
RedisConnection at line 1638
protected false|int
callZunionstore(string $output, array $keys, array $options = [])
Find the union between sets and store in a new set.
in
RedisConnection at line 1648
protected array
getScanOptions(array $arguments)
Get the Redis scan options.
in
RedisConnection at line 1661
mixed
scan(mixed $cursor, mixed ...$arguments)
Scan all keys based on options.
at line 98
protected mixed
callScan(mixed $cursor, mixed ...$arguments)
Scan all keys based on the given options.
in
RedisConnection at line 1691
mixed
zscan(mixed $key, mixed $cursor, mixed ...$arguments)
Scan the given set for all values based on options.
in
RedisConnection at line 1699
protected mixed
callZscan(mixed $key, mixed $cursor, mixed ...$arguments)
Execute the transformed ZSCAN command.
in
RedisConnection at line 1722
mixed
hscan(mixed $key, mixed $cursor, mixed ...$arguments)
Scan the given hash for all values based on options.
in
RedisConnection at line 1730
protected mixed
callHscan(mixed $key, mixed $cursor, mixed ...$arguments)
Execute the transformed HSCAN command.
in
RedisConnection at line 1753
mixed
sscan(mixed $key, mixed $cursor, mixed ...$arguments)
Scan the given set for all values based on options.
in
RedisConnection at line 1761
protected mixed
callSscan(mixed $key, mixed $cursor, mixed ...$arguments)
Execute the transformed SSCAN command.
in
RedisConnection at line 1784
protected array
prepareEval(mixed ...$arguments)
Prepare arguments for the eval command.
at line 223
protected mixed
callEval(string $script, int $numberOfKeys, mixed ...$arguments)
Evaluate a script and preserve standalone phpredis error semantics.
in
RedisConnection at line 1811
protected array
prepareEvalsha(mixed ...$arguments)
Prepare arguments for the evalsha command.
Falls back to eval in MULTI/PIPELINE mode because script('load') cannot execute synchronously while the connection is queueing.
at line 237
protected mixed
callEvalsha(string $script, int $numkeys, mixed ...$arguments)
Evaluate a script through the topology-aware SHA cache.
at line 251
protected array
prepareExecuteRaw(mixed ...$arguments)
Prepare a raw command for the node owning its first argument.
at line 266
protected mixed
callExecuteRaw(array $parameters)
Execute a raw command against the node owning its first argument.
in
RedisConnection at line 1864
protected never
callSubscribe(string $name, array $arguments)
Reject subscriptions on raw pooled connections.
Pub/sub requires a dedicated, long-lived connection that is incompatible with connection pooling. Use the coroutine-native subscriber instead:
Redis::subscribe($channels, $callback);
Redis::psubscribe($channels, $callback);
$subscriber = Redis::subscriber();
in
RedisConnection at line 1875
bool
serialized()
Determine if a custom serializer is configured on the connection.
in
RedisConnection at line 1883
bool
compressed()
Determine if compression is configured on the connection.
in
RedisConnection at line 1891
bool
lzfCompressed()
Determine if LZF compression is enabled.
in
RedisConnection at line 1900
bool
zstdCompressed()
Determine if ZSTD compression is enabled.
in
RedisConnection at line 1909
bool
lz4Compressed()
Determine if LZ4 compression is enabled.
in
RedisConnection at line 1926
mixed
withoutScanPrefix(callable $callback)
Execute the given callback without prefixing scan patterns.
Key prefixing remains unchanged. Hold this connection until the callback finishes so its scan options are restored before returning it to the pool.
in
RedisConnection at line 1954
mixed
withoutSerializationOrCompression(callable $callback)
Execute the given callback without serialization or compression.
Temporarily disables phpredis serialization and compression on the raw connection for operations that require raw integer values (e.g., rate limiter counters), then restores the original settings.
in
RedisConnection at line 1995
array
pack(array $values)
Pack values for use in Lua script ARGV parameters.
Unlike regular Redis commands where phpredis auto-serializes, Lua ARGV parameters must be pre-serialized strings.
Requires phpredis 6.0+ which provides the _pack() method.
in
RedisConnection at line 329
mixed
client(string $opt = '\'\'', mixed ...$args)
No description
in
RedisConnection at line 2034
mixed
evalWithShaCache(string $script, array $keys = [], array $args = [])
Execute a Lua script using evalSha with automatic fallback to eval.
Redis caches compiled Lua scripts by SHA1 hash. This method tries evalSha first (uses cached compiled script), and falls back to eval if the script isn't cached yet (NOSCRIPT error).
Unlike naive implementations that treat any false return as NOSCRIPT,
this method wraps script and data errors returned by phpredis as false
while native server, cluster, authentication, and transport exceptions
propagate unchanged.
at line 295
protected Throwable
scriptException(string $error)
Create an exception that preserves standalone phpredis semantics.
at line 305
protected mixed
normalizeNullReplies(mixed $result)
Normalize RedisCluster's null representation of RESP nil replies.
in
RedisConnection at line 2114
Generator
safeScan(string $pattern, int $count = 1000)
Safely scan the Redis keyspace for keys matching a pattern.
This method handles the phpredis OPT_PREFIX complexity correctly:
- Applies OPT_PREFIX to the scan pattern exactly once, respecting SCAN_PREFIX
- Strips OPT_PREFIX from returned keys so they work with other commands
The connection must be held with transform disabled so SCAN retains its native phpredis cursor and result shape.
in
RedisConnection at line 2140
int
flushByPattern(string $pattern)
Flush (delete) all Redis keys matching a pattern.
Use this inside withConnection(..., transform: false) when doing multiple operations on the same connection. No connection lifecycle overhead since you're operating on an existing connection.
For standalone/one-off operations, use Redis::flushByPattern() instead, which handles connection lifecycle automatically.
Uses SCAN to iterate keys efficiently and deletes them in batches. Correctly handles OPT_PREFIX to avoid the double-prefixing bug.
in
RedisConnection at line 329
mixed
get(string $key)
Get the value of a key
in
RedisConnection at line 329
mixed
set(string $key, mixed $value, mixed $expireResolution = 'null', int|null $expireTTL = 'null', string|null $flag = 'null')
Set the value of a key
in
RedisConnection at line 329
RedisCluster
mget(array $keys)
Get the values of multiple keys
in
RedisConnection at line 329
RedisCluster
setnx(string $key, mixed $value)
Set key if not exists
in
RedisConnection at line 329
RedisCluster
setNx(string $key, mixed $value)
Set key if not exists
in
RedisConnection at line 329
RedisCluster
hmget(string $key, array $fields)
Get hash field values
in
RedisConnection at line 329
RedisCluster
hmset(string $key, array $fieldValues)
Set hash field values
in
RedisConnection at line 329
RedisCluster
hsetnx(string $hash, string $key, mixed $value)
Set hash field if not exists
in
RedisConnection at line 329
mixed
hget(string $key, string $member)
Get hash field value
in
RedisConnection at line 329
RedisCluster
hset(string $key, mixed ...$fields_and_vals)
Set hash field values
in
RedisConnection at line 329
false|int
lrem(string $key, int $count, mixed $value)
Remove list elements
in
RedisConnection at line 329
RedisCluster
llen(string $key)
Get list length
in
RedisConnection at line 329
RedisCluster
blpop(array|string $key_or_keys, float|int|string $timeout_or_key, mixed ...$extra_args)
Blocking left pop from list
in
RedisConnection at line 329
RedisCluster
brpop(array|string $key_or_keys, float|int|string $timeout_or_key, mixed ...$extra_args)
Blocking right pop from list
in
RedisConnection at line 329
mixed
spop(string $key, int $count = '0')
Remove and return random set member
in
RedisConnection at line 329
RedisCluster
sRem(string $key, mixed $value, mixed ...$other_values)
Remove members from set
in
RedisConnection at line 329
RedisCluster
zadd(string $key, array|float $score_or_options, mixed ...$more_scores_and_mems)
Add members to sorted set
in
RedisConnection at line 329
RedisCluster
zcard(string $key)
Get sorted set cardinality
in
RedisConnection at line 329
RedisCluster
zcount(string $key, float|int|string $start, float|int|string $end)
Count sorted set members by score range
in
RedisConnection at line 329
RedisCluster
zrangebyscore(string $key, float|int|string $min, float|int|string $max, array $options = '[]')
Get sorted set members by score range
in
RedisConnection at line 329
RedisCluster
zrevrangebyscore(string $key, float|int|string $max, float|int|string $min, array $options = '[]') Get sorted set members by score range (reverse)
No description
in
RedisConnection at line 329
RedisCluster
zinterstore(string $output, array $keys, array $options = '[]')
Intersect sorted sets
in
RedisConnection at line 329
RedisCluster
zunionstore(string $output, array $keys, array $options = '[]')
Union sorted sets
in
RedisConnection at line 329
mixed
eval(string $script, int $numberOfKeys, mixed ...$arguments)
Evaluate Lua script
in
RedisConnection at line 329
mixed
evalsha(string $script, int $numkeys, mixed ...$arguments)
Evaluate Lua script by SHA1
in
RedisConnection at line 329
mixed
flushdb(mixed ...$arguments)
Flush database
in
RedisConnection at line 329
mixed
executeRaw(array $parameters)
Execute raw Redis command
in
RedisConnection at line 329
mixed
pipeline(callable|null $callback = 'null')
Execute commands in a pipeline
in
RedisConnection at line 329
RedisCluster
smembers(string $key)
Get all set members
in
RedisConnection at line 329
RedisCluster
hdel(string $key, string $field, string ...$other_fields)
Delete hash fields
in
RedisConnection at line 329
RedisCluster
zrem(mixed $key, mixed $member, mixed ...$other_members)
Remove sorted set members
in
RedisConnection at line 329
RedisCluster
hlen(string $key)
Get number of hash fields
in
RedisConnection at line 329
RedisCluster
hkeys(string $key)
Get all hash field names
in
RedisConnection at line 329
string
_serialize(mixed $value)
Serialize a value using configured serializer
in
RedisConnection at line 329
string
_digest(mixed $value)
No description
in
RedisConnection at line 329
string
_pack(mixed $value)
No description
in
RedisConnection at line 329
mixed
_unpack(string $value)
No description
in
RedisConnection at line 329
mixed
acl(string $subcmd, string ...$args)
No description
in
RedisConnection at line 329
RedisCluster
append(string $key, mixed $value)
No description
in
RedisConnection at line 329
Redis
auth(mixed $credentials)
No description
in
RedisConnection at line 329
RedisCluster
bgSave()
No description
in
RedisConnection at line 329
RedisCluster
bgrewriteaof()
No description
in
RedisConnection at line 329
RedisCluster
waitaof(int $numlocal, int $numreplicas, int $timeout)
No description
in
RedisConnection at line 329
RedisCluster
bitcount(string $key, int $start = '0', int $end = '-1', bool $bybit = 'false')
No description
in
RedisConnection at line 329
RedisCluster
bitop(string $operation, string $deskey, string $srckey, string ...$other_keys)
No description
in
RedisConnection at line 329
RedisCluster
bitpos(string $key, bool $bit, int $start = '0', int $end = '-1', bool $bybit = 'false')
No description
in
RedisConnection at line 329
RedisCluster
blPop(array|string $key_or_keys, float|int|string $timeout_or_key, mixed ...$extra_args)
Blocking left pop from list
in
RedisConnection at line 329
RedisCluster
brPop(array|string $key_or_keys, float|int|string $timeout_or_key, mixed ...$extra_args)
Blocking right pop from list
in
RedisConnection at line 329
RedisCluster|string
brpoplpush(string $src, string $dst, float|int $timeout)
No description
in
RedisConnection at line 329
RedisCluster
bzPopMax(array|string $key, int|string $timeout_or_key, mixed ...$extra_args)
No description
in
RedisConnection at line 329
RedisCluster
bzPopMin(array|string $key, int|string $timeout_or_key, mixed ...$extra_args)
No description
in
RedisConnection at line 329
RedisCluster
bzmpop(float $timeout, array $keys, string $from, int $count = '1')
No description
in
RedisConnection at line 329
RedisCluster
zmpop(array $keys, string $from, int $count = '1')
No description
in
RedisConnection at line 329
RedisCluster
blmpop(float $timeout, array $keys, string $from, int $count = '1')
No description
in
RedisConnection at line 329
RedisCluster
lmpop(array $keys, string $from, int $count = '1')
No description
in
RedisConnection at line 329
bool
clearLastError()
No description
in
RedisConnection at line 329
mixed
command(string|null $opt = 'null', mixed ...$args)
No description
in
RedisConnection at line 329
mixed
config(string $operation, array|string|null $key_or_settings = 'null', string|null $value = 'null')
No description
in
RedisConnection at line 329
bool
connect(string $host, int $port = '6379', float $timeout = '0', string|null $persistent_id = 'null', int $retry_interval = '0', float $read_timeout = '0', array|null $context = 'null')
No description
in
RedisConnection at line 329
RedisCluster
copy(string $src, string $dst, array|null $options = 'null')
No description
in
RedisConnection at line 329
RedisCluster
dbSize()
No description
in
RedisConnection at line 329
Redis|string
debug(string $key)
No description
in
RedisConnection at line 329
RedisCluster
decr(string $key, int $by = '1')
No description
in
RedisConnection at line 329
RedisCluster
decrBy(string $key, int $value)
No description
in
RedisConnection at line 329
RedisCluster
del(array|string $key, string ...$other_keys)
No description
in
RedisConnection at line 329
RedisCluster
delex(string $key, array|null $options = 'null')
No description
in
RedisConnection at line 329
RedisCluster
delifeq(string $key, mixed $value)
No description
in
RedisConnection at line 329
RedisCluster|string
digest(string $key)
No description
in
RedisConnection at line 329
RedisCluster|string
dump(string $key)
No description
in
RedisConnection at line 329
RedisCluster|string
echo(string $str)
No description
in
RedisConnection at line 329
mixed
eval_ro(string $script_sha, array $args = '[]', int $num_keys = '0')
No description
in
RedisConnection at line 329
mixed
evalsha_ro(string $sha1, array $args = '[]', int $num_keys = '0')
No description
in
RedisConnection at line 329
Redis
exec()
No description
in
RedisConnection at line 329
RedisCluster
exists(mixed $key, mixed ...$other_keys)
No description
in
RedisConnection at line 329
RedisCluster
expire(string $key, int $timeout, string|null $mode = 'null')
No description
in
RedisConnection at line 329
RedisCluster
expireAt(string $key, int $timestamp, string|null $mode = 'null')
No description
in
RedisConnection at line 329
Redis
failover(array|null $to = 'null', bool $abort = 'false', int $timeout = '0')
No description
in
RedisConnection at line 329
RedisCluster
expiretime(string $key)
No description
in
RedisConnection at line 329
RedisCluster
pexpiretime(string $key)
No description
in
RedisConnection at line 329
mixed
fcall(string $fn, array $keys = '[]', array $args = '[]')
No description
in
RedisConnection at line 329
mixed
fcall_ro(string $fn, array $keys = '[]', array $args = '[]')
No description
in
RedisConnection at line 329
RedisCluster
flushAll(bool|null $sync = 'null')
No description
in
RedisConnection at line 329
mixed
flushDB(mixed ...$arguments)
Flush database
in
RedisConnection at line 329
Redis|string
function(string $operation, mixed ...$args)
No description
in
RedisConnection at line 329
RedisCluster
geoadd(string $key, float $lng, float $lat, string $member, mixed ...$other_triples_and_options)
No description
in
RedisConnection at line 329
RedisCluster
geodist(string $key, string $src, string $dst, string|null $unit = 'null')
No description
in
RedisConnection at line 329
RedisCluster
geohash(string $key, string $member, string ...$other_members)
No description
in
RedisConnection at line 329
RedisCluster
geopos(string $key, string $member, string ...$other_members)
No description
in
RedisConnection at line 329
mixed
georadius(string $key, float $lng, float $lat, float $radius, string $unit, array $options = '[]')
No description
in
RedisConnection at line 329
mixed
georadius_ro(string $key, float $lng, float $lat, float $radius, string $unit, array $options = '[]')
No description
in
RedisConnection at line 329
mixed
georadiusbymember(string $key, string $member, float $radius, string $unit, array $options = '[]')
No description
in
RedisConnection at line 329
mixed
georadiusbymember_ro(string $key, string $member, float $radius, string $unit, array $options = '[]')
No description
in
RedisConnection at line 329
array
geosearch(string $key, array|string $position, array|int|float $shape, string $unit, array $options = '[]')
No description
in
RedisConnection at line 329
RedisCluster
geosearchstore(string $dst, string $src, array|string $position, array|int|float $shape, string $unit, array $options = '[]')
No description
in
RedisConnection at line 329
mixed
getAuth()
No description
in
RedisConnection at line 329
RedisCluster
getBit(string $key, int $idx)
No description
in
RedisConnection at line 329
RedisCluster|string
getEx(string $key, array $options = '[]')
No description
in
RedisConnection at line 329
int
getDBNum()
No description
in
RedisConnection at line 329
RedisCluster|string
getDel(string $key)
No description
in
RedisConnection at line 329
string
getHost()
No description
in
RedisConnection at line 329
null|string
getLastError()
No description
in
RedisConnection at line 329
int
getMode()
No description
in
RedisConnection at line 329
mixed
getOption(int $option)
No description
in
RedisConnection at line 329
null|string
getPersistentID()
No description
in
RedisConnection at line 329
int
getPort()
No description
in
RedisConnection at line 329
RedisCluster|string
getRange(string $key, int $start, int $end)
No description
in
RedisConnection at line 329
RedisCluster|string
lcs(string $key1, string $key2, array|null $options = 'null')
No description
in
RedisConnection at line 329
float
getReadTimeout()
No description
in
RedisConnection at line 329
RedisCluster|string
getset(string $key, mixed $value)
No description
in
RedisConnection at line 329
false|float
getTimeout()
No description
in
RedisConnection at line 329
array
getTransferredBytes()
No description
in
RedisConnection at line 329
void
clearTransferredBytes()
No description
in
RedisConnection at line 329
RedisCluster
getWithMeta(string $key)
No description
in
RedisConnection at line 329
RedisCluster
hDel(string $key, string $field, string ...$other_fields)
Delete hash fields
in
RedisConnection at line 329
RedisCluster
hexpire(string $key, int $ttl, array $fields, string|null $mode = 'null')
No description
in
RedisConnection at line 329
RedisCluster
hpexpire(string $key, int $ttl, array $fields, string|null $mode = 'null')
No description
in
RedisConnection at line 329
RedisCluster
hexpireat(string $key, int $time, array $fields, string|null $mode = 'null')
No description
in
RedisConnection at line 329
RedisCluster
hpexpireat(string $key, int $mstime, array $fields, string|null $mode = 'null')
No description
in
RedisConnection at line 329
RedisCluster
httl(string $key, array $fields)
No description
in
RedisConnection at line 329
RedisCluster
hpttl(string $key, array $fields)
No description
in
RedisConnection at line 329
RedisCluster
hexpiretime(string $key, array $fields)
No description
in
RedisConnection at line 329
RedisCluster
hpexpiretime(string $key, array $fields)
No description
in
RedisConnection at line 329
RedisCluster
hpersist(string $key, array $fields)
No description
in
RedisConnection at line 329
RedisCluster
hExists(string $key, string $field)
No description
in
RedisConnection at line 329
mixed
hGet(string $key, string $member)
Get hash field value
in
RedisConnection at line 329
RedisCluster
hGetAll(string $key)
No description
in
RedisConnection at line 329
mixed
hGetWithMeta(string $key, string $member)
No description
in
RedisConnection at line 329
RedisCluster
hgetdel(string $key, array $fields)
No description
in
RedisConnection at line 329
RedisCluster
hgetex(string $key, array $fields, string|array|null $expiry = 'null')
No description
in
RedisConnection at line 329
RedisCluster
hIncrBy(string $key, string $field, int $value)
No description
in
RedisConnection at line 329
RedisCluster
hIncrByFloat(string $key, string $field, float $value)
No description
in
RedisConnection at line 329
RedisCluster
hKeys(string $key)
Get all hash field names
in
RedisConnection at line 329
RedisCluster
hLen(string $key)
Get number of hash fields
in
RedisConnection at line 329
RedisCluster
hMget(string $key, array $fields)
Get hash field values
in
RedisConnection at line 329
RedisCluster
hMset(string $key, array $fieldValues)
Set hash field values
in
RedisConnection at line 329
RedisCluster|string
hRandField(string $key, array|null $options = 'null')
No description
in
RedisConnection at line 329
RedisCluster
hSet(string $key, mixed ...$fields_and_vals)
Set hash field values
in
RedisConnection at line 329
RedisCluster
hSetNx(string $hash, string $key, mixed $value)
Set hash field if not exists
in
RedisConnection at line 329
RedisCluster
hsetex(string $key, array $fields, array|null $expiry = 'null')
No description
in
RedisConnection at line 329
RedisCluster
hStrLen(string $key, string $field)
No description
in
RedisConnection at line 329
RedisCluster
hVals(string $key)
No description
in
RedisConnection at line 329
RedisCluster
incr(string $key, int $by = '1')
No description
in
RedisConnection at line 329
RedisCluster
incrBy(string $key, int $value)
No description
in
RedisConnection at line 329
RedisCluster
incrByFloat(string $key, float $value)
No description
in
RedisConnection at line 329
RedisCluster
info(string ...$sections)
No description
in
RedisConnection at line 329
bool
isConnected()
No description
in
RedisConnection at line 329
RedisCluster
keys(string $pattern)
No description
in
RedisConnection at line 329
RedisCluster
lInsert(string $key, string $pos, mixed $pivot, mixed $value)
No description
in
RedisConnection at line 329
RedisCluster
lLen(string $key)
Get list length
in
RedisConnection at line 329
RedisCluster|string
lMove(string $src, string $dst, string $wherefrom, string $whereto)
No description
in
RedisConnection at line 329
RedisCluster|string
blmove(string $src, string $dst, string $wherefrom, string $whereto, float $timeout)
No description
in
RedisConnection at line 329
RedisCluster|string
lPop(string $key, int $count = '0')
No description
in
RedisConnection at line 329
RedisCluster
lPos(string $key, mixed $value, array|null $options = 'null')
No description
in
RedisConnection at line 329
RedisCluster
lPush(string $key, mixed ...$elements)
No description
in
RedisConnection at line 329
RedisCluster
rPush(string $key, mixed ...$elements)
No description
in
RedisConnection at line 329
RedisCluster
lPushx(string $key, mixed $value)
No description
in
RedisConnection at line 329
RedisCluster
rPushx(string $key, mixed $value)
No description
in
RedisConnection at line 329
RedisCluster
lSet(string $key, int $index, mixed $value)
No description
in
RedisConnection at line 329
int
lastSave()
No description
in
RedisConnection at line 329
mixed
lindex(string $key, int $index)
No description
in
RedisConnection at line 329
RedisCluster
lrange(string $key, int $start, int $end)
No description
in
RedisConnection at line 329
RedisCluster
ltrim(string $key, int $start, int $end)
No description
in
RedisConnection at line 329
Redis
migrate(string $host, int $port, array|string $key, int $dstdb, int $timeout, bool $copy = 'false', bool $replace = 'false', mixed $credentials = 'null')
No description
in
RedisConnection at line 329
Redis
move(string $key, int $index)
No description
in
RedisConnection at line 329
RedisCluster
mset(array $key_values)
No description
in
RedisConnection at line 329
RedisCluster
msetex(array $key_values, int|float|array|null $expiry = 'null')
No description
in
RedisConnection at line 329
RedisCluster
msetnx(array $key_values)
No description
in
RedisConnection at line 329
RedisCluster
multi(int $value = '1')
No description
in
RedisConnection at line 329
RedisCluster|string
object(string $subcommand, string $key)
No description
in
RedisConnection at line 329
bool
pconnect(string $host, int $port = '6379', float $timeout = '0', string|null $persistent_id = 'null', int $retry_interval = '0', float $read_timeout = '0', array|null $context = 'null')
No description
in
RedisConnection at line 329
RedisCluster
persist(string $key)
No description
in
RedisConnection at line 329
bool
pexpire(string $key, int $timeout, string|null $mode = 'null')
No description
in
RedisConnection at line 329
RedisCluster
pexpireAt(string $key, int $timestamp, string|null $mode = 'null')
No description
in
RedisConnection at line 329
RedisCluster
pfadd(string $key, array $elements)
No description
in
RedisConnection at line 329
RedisCluster
pfcount(array|string $key_or_keys)
No description
in
RedisConnection at line 329
RedisCluster
pfmerge(string $dst, array $srckeys)
No description
in
RedisConnection at line 329
RedisCluster|string
ping(string|null $message = 'null')
No description
in
RedisConnection at line 329
RedisCluster
psetex(string $key, int $expire, mixed $value)
No description
in
RedisConnection at line 329
RedisCluster
pttl(string $key)
No description
in
RedisConnection at line 329
RedisCluster
publish(string $channel, string $message)
No description
in
RedisConnection at line 329
mixed
pubsub(string $command, mixed $arg = 'null')
No description
in
RedisConnection at line 329
Redis
punsubscribe(array $patterns)
No description
in
RedisConnection at line 329
RedisCluster|string
rPop(string $key, int $count = '0')
No description
in
RedisConnection at line 329
RedisCluster|string
randomKey()
No description
in
RedisConnection at line 329
mixed
rawcommand(string $command, mixed ...$args)
No description
in
RedisConnection at line 329
RedisCluster
rename(string $old_name, string $new_name)
No description
in
RedisConnection at line 329
RedisCluster
renameNx(string $key_src, string $key_dst)
No description
in
RedisConnection at line 329
RedisCluster
restore(string $key, int $ttl, string $value, array|null $options = 'null')
No description
in
RedisConnection at line 329
mixed
role()
No description
in
RedisConnection at line 329
RedisCluster|string
rpoplpush(string $srckey, string $dstkey)
No description
in
RedisConnection at line 329
RedisCluster
sAdd(string $key, mixed $value, mixed ...$other_values)
No description
in
RedisConnection at line 329
int
sAddArray(string $key, array $values)
No description
in
RedisConnection at line 329
RedisCluster
sDiff(string $key, string ...$other_keys)
No description
in
RedisConnection at line 329
RedisCluster
sDiffStore(string $dst, string $key, string ...$other_keys)
No description
in
RedisConnection at line 329
RedisCluster
sInter(array|string $key, string ...$other_keys)
No description
in
RedisConnection at line 329
RedisCluster
sintercard(array $keys, int $limit = '-1')
No description
in
RedisConnection at line 329
RedisCluster
sInterStore(array|string $key, string ...$other_keys)
No description
in
RedisConnection at line 329
RedisCluster
sMembers(string $key)
Get all set members
in
RedisConnection at line 329
RedisCluster
sMisMember(string $key, string $member, string ...$other_members)
No description
in
RedisConnection at line 329
RedisCluster
sMove(string $src, string $dst, mixed $value)
No description
in
RedisConnection at line 329
mixed
sPop(string $key, int $count = '0')
Remove and return random set member
in
RedisConnection at line 329
mixed
sRandMember(string $key, int $count = '0')
No description
in
RedisConnection at line 329
RedisCluster
sUnion(string $key, string ...$other_keys)
No description
in
RedisConnection at line 329
RedisCluster
sUnionStore(string $dst, string $key, string ...$other_keys)
No description
in
RedisConnection at line 329
RedisCluster
save()
No description
in
RedisConnection at line 329
RedisCluster
scard(string $key)
No description
in
RedisConnection at line 329
mixed
script(string $command, mixed ...$args)
No description
in
RedisConnection at line 329
Redis
select(int $db)
No description
in
RedisConnection at line 329
false|string
serverName()
No description
in
RedisConnection at line 329
false|string
serverVersion()
No description
in
RedisConnection at line 329
RedisCluster
setBit(string $key, int $idx, bool $value)
No description
in
RedisConnection at line 329
RedisCluster
setRange(string $key, int $index, string $value)
No description
in
RedisConnection at line 329
bool
setOption(int $option, mixed $value)
No description
in
RedisConnection at line 329
RedisCluster
setex(string $key, int $expire, mixed $value)
No description
in
RedisConnection at line 329
RedisCluster
sismember(string $key, mixed $value)
No description
in
RedisConnection at line 329
Redis
replicaof(string|null $host = 'null', int $port = '6379')
No description
in
RedisConnection at line 329
RedisCluster
touch(array|string $key_or_array, string ...$more_keys)
No description
in
RedisConnection at line 329
mixed
slowlog(string $operation, int $length = '0')
No description
in
RedisConnection at line 329
mixed
sort(string $key, array|null $options = 'null')
No description
in
RedisConnection at line 329
mixed
sort_ro(string $key, array|null $options = 'null')
No description
in
RedisConnection at line 329
RedisCluster
srem(string $key, mixed $value, mixed ...$other_values)
Remove members from set
in
RedisConnection at line 329
RedisCluster
strlen(string $key)
No description
in
RedisConnection at line 329
Redis
sunsubscribe(array $channels)
No description
in
RedisConnection at line 329
Redis
swapdb(int $src, int $dst)
No description
in
RedisConnection at line 329
RedisCluster
time()
No description
in
RedisConnection at line 329
RedisCluster
ttl(string $key)
No description
in
RedisConnection at line 329
RedisCluster
type(string $key)
No description
in
RedisConnection at line 329
RedisCluster
unlink(array|string $key, string ...$other_keys)
No description
in
RedisConnection at line 329
Redis
unsubscribe(array $channels)
No description
in
RedisConnection at line 329
Redis
unwatch()
No description
in
RedisConnection at line 329
RedisCluster
vadd(string $key, array $values, mixed $element, array|null $options = 'null')
No description
in
RedisConnection at line 329
RedisCluster
vcard(string $key)
No description
in
RedisConnection at line 329
RedisCluster
vdim(string $key)
No description
in
RedisConnection at line 329
RedisCluster
vemb(string $key, mixed $member, bool $raw = 'false')
No description
in
RedisConnection at line 329
RedisCluster|string
vgetattr(string $key, mixed $member, bool $decode = 'true')
No description
in
RedisConnection at line 329
RedisCluster
vinfo(string $key)
No description
in
RedisConnection at line 329
RedisCluster
vismember(string $key, mixed $member)
No description
in
RedisConnection at line 329
RedisCluster
vlinks(string $key, mixed $member, bool $withscores = 'false')
No description
in
RedisConnection at line 329
RedisCluster|string
vrandmember(string $key, int $count = '0')
No description
in
RedisConnection at line 329
RedisCluster
vrange(string $key, string $min, string $max, int $count = '-1')
No description
in
RedisConnection at line 329
RedisCluster
vrem(string $key, mixed $member)
No description
in
RedisConnection at line 329
RedisCluster
vsetattr(string $key, mixed $member, array|string $attributes)
No description
in
RedisConnection at line 329
RedisCluster
vsim(string $key, mixed $member, array|null $options = 'null')
No description
in
RedisConnection at line 329
RedisCluster
watch(array|string $key, string ...$other_keys)
No description
in
RedisConnection at line 329
false|int
wait(int $numreplicas, int $timeout)
No description
in
RedisConnection at line 329
false|int
xack(string $key, string $group, array $ids)
No description
in
RedisConnection at line 329
RedisCluster|string
xadd(string $key, int|string $id, array $values, int $maxlen = '0', bool $approx = 'false', bool $nomkstream = 'false')
No description
in
RedisConnection at line 329
RedisCluster
xautoclaim(string $key, string $group, string $consumer, int $min_idle, int|string $start, int $count = '-1', bool $justid = 'false')
No description
in
RedisConnection at line 329
RedisCluster
xclaim(string $key, string $group, string $consumer, int $min_idle, array $ids, array $options)
No description
in
RedisConnection at line 329
RedisCluster
xdel(string $key, array $ids)
No description
in
RedisConnection at line 329
RedisCluster
xdelex(string $key, array $ids, string|null $mode = 'null')
No description
in
RedisConnection at line 329
mixed
xgroup(string $operation, string|null $key = 'null', string|null $group = 'null', int|string|null $id_or_consumer = 'null', bool $mkstream = 'false', int $entries_read = '-2')
No description
in
RedisConnection at line 329
mixed
xinfo(string $operation, string|null $arg1 = 'null', string|null $arg2 = 'null', int $count = '-1')
No description
in
RedisConnection at line 329
RedisCluster
xlen(string $key)
No description
in
RedisConnection at line 329
RedisCluster
xpending(string $key, string $group, int|string|null $start = 'null', int|string|null $end = 'null', int $count = '-1', string|null $consumer = 'null')
No description
in
RedisConnection at line 329
RedisCluster
xrange(string $key, int|string $start, int|string $end, int $count = '-1')
No description
in
RedisConnection at line 329
RedisCluster
xread(array $streams, int $count = '-1', int $block = '-1')
No description
in
RedisConnection at line 329
RedisCluster
xreadgroup(string $group, string $consumer, array $streams, int $count = '1', int $block = '1')
No description
in
RedisConnection at line 329
RedisCluster
xrevrange(string $key, int|string $end, int|string $start, int $count = '-1')
No description
in
RedisConnection at line 329
RedisCluster
xtrim(string $key, int|string $threshold, bool $approx = 'false', bool $minid = 'false', int $limit = '-1')
No description
in
RedisConnection at line 329
RedisCluster
zAdd(string $key, array|float $score_or_options, mixed ...$more_scores_and_mems)
Add members to sorted set
in
RedisConnection at line 329
RedisCluster
zCard(string $key)
Get sorted set cardinality
in
RedisConnection at line 329
RedisCluster
zCount(string $key, float|int|string $start, float|int|string $end)
Count sorted set members by score range
in
RedisConnection at line 329
RedisCluster
zIncrBy(string $key, float $value, mixed $member)
No description
in
RedisConnection at line 329
RedisCluster
zLexCount(string $key, string $min, string $max)
No description
in
RedisConnection at line 329
RedisCluster
zMscore(string $key, mixed $member, mixed ...$other_members)
No description
in
RedisConnection at line 329
RedisCluster
zPopMax(string $key, int|null $count = 'null')
No description
in
RedisConnection at line 329
RedisCluster
zPopMin(string $key, int|null $count = 'null')
No description
in
RedisConnection at line 329
RedisCluster
zRange(string $key, string|int $start, string|int $end, array|bool|null $options = 'null')
No description
in
RedisConnection at line 329
RedisCluster
zRangeByLex(string $key, string $min, string $max, int $offset = '-1', int $count = '-1')
No description
in
RedisConnection at line 329
RedisCluster
zRangeByScore(string $key, float|int|string $min, float|int|string $max, array $options = '[]')
Get sorted set members by score range
in
RedisConnection at line 329
RedisCluster
zrangestore(string $dstkey, string $srckey, string $start, string $end, array|bool|null $options = 'null')
No description
in
RedisConnection at line 329
RedisCluster|string
zRandMember(string $key, array|null $options = 'null')
No description
in
RedisConnection at line 329
RedisCluster
zRank(string $key, mixed $member)
No description
in
RedisConnection at line 329
RedisCluster
zRem(mixed $key, mixed $member, mixed ...$other_members)
Remove sorted set members
in
RedisConnection at line 329
RedisCluster
zRemRangeByLex(string $key, string $min, string $max)
No description
in
RedisConnection at line 329
RedisCluster
zRemRangeByRank(string $key, int $start, int $end)
No description
in
RedisConnection at line 329
RedisCluster
zRemRangeByScore(string $key, float|int|string $start, float|int|string $end)
No description
in
RedisConnection at line 329
RedisCluster
zRevRange(string $key, int $start, int $end, mixed $scores = 'null')
No description
in
RedisConnection at line 329
RedisCluster
zRevRangeByLex(string $key, string $max, string $min, int $offset = '-1', int $count = '-1')
No description
in
RedisConnection at line 329
RedisCluster
zRevRangeByScore(string $key, float|int|string $max, float|int|string $min, array $options = '[]') Get sorted set members by score range (reverse)
No description
in
RedisConnection at line 329
RedisCluster
zRevRank(string $key, mixed $member)
No description
in
RedisConnection at line 329
RedisCluster
zScore(string $key, mixed $member)
No description
in
RedisConnection at line 329
RedisCluster
zdiff(array $keys, array|null $options = 'null')
No description
in
RedisConnection at line 329
RedisCluster
zdiffstore(string $dst, array $keys)
No description
in
RedisConnection at line 329
RedisCluster
zinter(array $keys, array|null $weights = 'null', array|null $options = 'null')
No description
in
RedisConnection at line 329
RedisCluster
zintercard(array $keys, int $limit = '-1')
No description
in
RedisConnection at line 329
RedisCluster
zunion(array $keys, array|null $weights = 'null', array|null $options = 'null')
No description
at line 274
protected mixed
callFlushdb(mixed ...$arguments)
Flush the selected Redis database on all master nodes.
in
PhpRedisConnection at line 133
protected Redis
createRedis(array $config)
Create a redis connection.
in
PhpRedisConnection at line 162
protected string
formatHost(array $config)
Format the host using the scheme if available.
in
PhpRedisConnection at line 197
protected array
normalizeContext(array $context)
Normalize the SSL context for a standalone Redis connection.
Redis::connect() expects the context as ['stream' => ['verify_peer' => false, ...]].
in
PhpRedisConnection at line 215
protected Redis
createRedisSentinel()
Create a redis sentinel connection.
at line 88
array
masters()
Get the master nodes in the cluster.
at line 198
protected array|false
callInfo(string ...$sections)
Get server information from the default Cluster node.
at line 211
protected bool|string
callPing(string|null $message = null)
Ping the default Cluster node.
at line 338
protected bool
standaloneWouldThrow(string $error)
Determine whether standalone phpredis throws a Redis error reply.
at line 355
protected RedisCluster
createRedisCluster()
Create a Redis Cluster connection.
at line 400
protected array
normalizeClusterContext(array $context)
Normalize the SSL context for a Redis Cluster connection.
RedisCluster::__construct() expects a flat context ['verify_peer' => false, ...].
at line 416
protected mixed
formatClusterPassword()
Format the password for the RedisCluster constructor.