RedisConnection
abstract class RedisConnection extends Connection
Abstract base class for pooled Redis connections with Laravel-style method transformations.
Traits
Constants
| private CONNECTION_LEVEL_PHPREDIS_OPTIONS |
Top-level connection config keys that should be applied through setOption. |
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 | ||
| protected float | $createdAt | ||
| protected float | $lifetimeExpiresAt | ||
| protected bool | $availableForReuse | ||
| protected Dispatcher|null | $eventDispatcher | ||
| protected array | $config | ||
| protected int|null | $database | Current redis database. |
|
| protected bool | $watching | Determine if the native connection is watching keys. |
|
| protected bool | $shouldTransform | Determine if the connection calls should be transformed to Laravel style. |
Methods
Create a new Redis connection instance.
Release the connection back to pool.
Check if the connection is still valid.
Get the active connection.
Mix another object into the class.
Dynamically handle calls to the class.
Pass other method calls down to the underlying client.
Get the connection name.
Get the event dispatcher instance.
Reconnect to Redis.
Mark the underlying Redis client as freshly connected.
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.
Close the current connection.
Check the Redis client for heartbeat health.
Execute the native Redis DISCARD command.
Clear the tracked watch state after callback-form transaction completion.
Set current redis database.
Determine if this connection has been idle long enough to be evicted.
Get the connection generation creation time.
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 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.
Get the current transformation state.
Returns the value of the given key.
Get the values of all the given keys.
Prepare arguments for the set command.
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.
Prepare arguments for the lrem command.
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 zadd command.
Add one or more members to a sorted set or update its score if it already exists.
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.
Get the Redis scan options.
Scans all keys based on options.
Scans the given set for all values based on options.
Scans the given hash for all values based on options.
Scans the given set for all values based on options.
Prepare arguments for the eval command.
Evaluate a script and return its result.
Prepare arguments for the evalsha command.
Evaluate a LUA script serverside, from the SHA1 hash of the script instead of the script itself.
Prepare arguments for the executeRaw command.
Execute a raw command.
Reject subscriptions on raw pooled connections.
Determine if a custom serializer is configured on the connection.
Determine if compression is configured on the connection.
Execute the given callback without serialization or compression.
Pack values for use in Lua script ARGV parameters.
No description
Execute a Lua script using evalSha with automatic fallback to eval.
Safely scan the Redis keyspace for keys matching a pattern.
Flush (delete) all Redis keys matching a pattern.
Get the value of a key
Set the value of a key
Get the values of multiple keys
Set key if not exists
Set key if not exists
Get hash field values
Set hash field values
Set hash field if not exists
Get hash field value
Set hash field values
Remove list elements
Get list length
Blocking left pop from list
Blocking right pop from list
Remove and return random set member
Remove members from set
Add members to sorted set
Get sorted set cardinality
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
Flush database
Execute raw Redis command
Execute commands in a pipeline
Get all set members
Delete hash fields
Remove sorted set members
Get number of hash fields
Get all hash field names
Serialize a value using configured serializer
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
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
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
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
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
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
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
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
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
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
No description
No description
No description
No description
Details
at line 404
__construct(Container $container, PoolInterface $pool, array $config)
Create a new Redis connection instance.
at line 732
void
release()
Release the connection back to pool.
in
Connection at line 68
void
discard()
Discard the connection from its pool.
in
Connection at line 76
mixed
getConnection()
Get the underlying connection, with retry on failure.
at line 513
bool
check()
Check if the connection is still valid.
in
Connection at line 109
float
getLastUseTime()
Get the last use time.
in
Connection at line 117
float
getLastReleaseTime()
Get the last release time.
in
Connection at line 125
protected void
markInvalid()
Mark the connection as invalid.
in
Connection at line 133
protected void
markValid()
Mark the connection as valid.
at line 495
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.
at line 415
__call(mixed $name, mixed $arguments)
Pass other method calls down to the underlying client.
at line 542
string
getName()
Get the connection name.
at line 550
Dispatcher|null
getEventDispatcher()
Get the event dispatcher instance.
at line 558
abstract bool
reconnect()
Reconnect to Redis.
at line 563
protected void
markReconnected()
Mark the underlying Redis client as freshly connected.
at line 580
protected void
setOptions(Redis|RedisCluster $redis)
Set configured options on a Redis or RedisCluster client.
at line 609
protected array
configuredPhpRedisOptions()
Get the phpredis options configured on the connection.
at line 629
protected int
phpRedisOption(string $name)
Resolve a phpredis option name to its native option constant.
at line 653
protected int
parseBackoffAlgorithm(mixed $algorithm)
Parse a friendly phpredis backoff algorithm name.
at line 680
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.
at line 699
bool
heartbeatCheck(float $timeout)
Check the Redis client for heartbeat health.
at line 803
bool|Redis
discardTransaction()
Execute the native Redis DISCARD command.
Use this method on a held connection because discard() removes the connection from its pool.
at line 819
void
clearWatchState()
| internal |
Clear the tracked watch state after callback-form transaction completion.
at line 827
void
setDatabase(int|null $database)
Set current redis database.
at line 835
bool
isIdleExpired(float|null $now = null)
Determine if this connection has been idle long enough to be evicted.
at line 848
float
getCreatedAt()
Get the connection generation creation time.
at line 856
bool
isLifetimeExpired(float|null $now = null)
Determine if this connection generation has reached its maximum lifetime.
at line 868
protected bool
shouldInvalidateAfter(RedisException $exception)
Determine whether a failed command left the connection unsafe to reuse.
at line 889
protected bool
isQueueingMode()
Determine if the underlying Redis client is in pipeline/multi mode.
Returns false by default. PhpRedisConnection overrides to check the actual mode on the \Redis client.
at line 897
bool
isCluster()
Determine if the connection is to a Redis Cluster.
at line 905
static bool
hasHashTag(string $key)
Determine if the given key contains a Redis Cluster hash tag.
at line 921
protected bool
pingForHeartbeat()
Ping Redis for heartbeat health without shadowing the public Redis PING command.
at line 957
protected void
log(string $message, string $level = LogLevel::WARNING)
Log a redis connection message.
at line 967
RedisConnection
shouldTransform(bool $shouldTransform = true)
Determine if the connection calls should be transformed to Laravel style.
at line 977
bool
getShouldTransform()
Get the current transformation state.
at line 985
protected string|null
callGet(string $key)
Returns the value of the given key.
at line 995
protected array
callMget(array $keys)
Get the values of all the given keys.
at line 1007
protected array
prepareSet(mixed ...$arguments)
Prepare arguments for the set command.
at line 1020
protected bool
callSet(string $key, mixed $value, string|null $expireResolution = null, int|null $expireTTL = null, string|null $flag = null)
Set the string value in the argument as the value of the key.
at line 1030
protected int
callSetnx(string $key, mixed $value)
Set the given key if it doesn't exist.
at line 1040
protected array
prepareHmget(mixed ...$arguments)
Prepare arguments for the hmget command.
at line 1051
protected array
callHmget(string $key, mixed ...$dictionary)
Get the value of the given hash fields.
at line 1065
protected array
prepareHmset(mixed ...$arguments)
Prepare arguments for the hmset command.
at line 1083
protected bool
callHmset(string $key, mixed ...$dictionary)
Set the given hash fields to their respective values.
at line 1093
protected int
callHsetnx(string $hash, string $key, mixed $value)
Set the given hash field if it doesn't exist.
at line 1103
protected array
prepareLrem(mixed ...$arguments)
Prepare arguments for the lrem command.
at line 1113
protected false|int
callLrem(string $key, int $count, mixed $value)
Removes the first count occurrences of the value element from the list.
at line 1123
protected array|null
callBlpop(mixed ...$arguments)
Removes and returns the first element of the list stored at key.
at line 1133
protected array|null
callBrpop(mixed ...$arguments)
Removes and returns the last element of the list stored at key.
at line 1146
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.
at line 1160
protected array
prepareZadd(mixed ...$arguments)
Prepare arguments for the zadd command.
at line 1188
protected int
callZadd(string $key, mixed ...$dictionary)
Add one or more members to a sorted set or update its score if it already exists.
at line 1200
protected array
prepareZrangebyscore(mixed ...$arguments)
Prepare arguments for the zrangebyscore command.
at line 1218
protected array
callZrangebyscore(string $key, mixed $min, mixed $max, array $options = [])
Return elements with score between $min and $max.
at line 1230
protected array
prepareZrevrangebyscore(mixed ...$arguments)
Prepare arguments for the zrevrangebyscore command.
at line 1248
protected array
callZrevrangebyscore(string $key, mixed $max, mixed $min, array $options = [])
Return elements with score between $max and $min in reverse order.
at line 1260
protected array
prepareZinterstore(mixed ...$arguments)
Prepare arguments for the zinterstore command.
at line 1271
protected int
callZinterstore(string $output, array $keys, array $options = [])
Find the intersection between sets and store in a new set.
at line 1283
protected array
prepareZunionstore(mixed ...$arguments)
Prepare arguments for the zunionstore command.
at line 1294
protected int
callZunionstore(string $output, array $keys, array $options = [])
Find the union between sets and store in a new set.
at line 1304
protected array
getScanOptions(array $arguments)
Get the Redis scan options.
at line 1320
mixed
scan(mixed $cursor, array ...$arguments)
Scans all keys based on options.
at line 1348
mixed
zscan(string $key, mixed $cursor, array ...$arguments)
Scans the given set for all values based on options.
at line 1377
mixed
hscan(string $key, mixed $cursor, array ...$arguments)
Scans the given hash for all values based on options.
at line 1406
mixed
sscan(string $key, mixed $cursor, array ...$arguments)
Scans the given set for all values based on options.
at line 1433
protected array
prepareEval(mixed ...$arguments)
Prepare arguments for the eval command.
at line 1445
protected mixed
callEval(string $script, int $numberOfKeys, mixed ...$arguments)
Evaluate a script and return its result.
at line 1460
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 1472
protected mixed
callEvalsha(string $script, int $numkeys, mixed ...$arguments)
Evaluate a LUA script serverside, from the SHA1 hash of the script instead of the script itself.
at line 1486
protected array
prepareExecuteRaw(mixed ...$arguments)
Prepare arguments for the executeRaw command.
at line 1494
protected mixed
callExecuteRaw(array $parameters)
Execute a raw command.
at line 1513
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();
at line 1524
bool
serialized()
Determine if a custom serializer is configured on the connection.
at line 1532
bool
compressed()
Determine if compression is configured on the connection.
at line 1544
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.
at line 1584
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.
at line 329
mixed
client(string $opt = '\'\'', mixed ...$args)
No description
at line 1621
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 properly distinguishes NOSCRIPT errors from other failures
(syntax errors, OOM, WRONGTYPE, etc.) and throws on non-NOSCRIPT errors.
at line 1677
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:
- Automatically prepends OPT_PREFIX to the scan pattern
- 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.
at line 1701
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.
at line 329
mixed
get(string $key)
Get the value of a key
at line 329
bool
set(string $key, mixed $value, mixed $expireResolution = 'null', mixed $expireTTL = 'null', mixed $flag = 'null')
Set the value of a key
at line 329
array
mget(array $keys)
Get the values of multiple keys
at line 329
Redis
setnx(string $key, mixed $value)
Set key if not exists
at line 329
Redis
setNx(string $key, mixed $value)
Set key if not exists
at line 329
Redis
hmget(string $key, array $fields)
Get hash field values
at line 329
Redis
hmset(string $key, array $fieldValues)
Set hash field values
at line 329
Redis
hsetnx(string $hash, string $key, mixed $value)
Set hash field if not exists
at line 329
mixed
hget(string $key, string $member)
Get hash field value
at line 329
Redis
hset(string $key, mixed ...$fields_and_vals)
Set hash field values
at line 329
false|int
lrem(string $key, int $count, mixed $value)
Remove list elements
at line 329
Redis
llen(string $key)
Get list length
at line 329
Redis
blpop(array|string $key_or_keys, float|int|string $timeout_or_key, mixed ...$extra_args)
Blocking left pop from list
at line 329
Redis
brpop(array|string $key_or_keys, float|int|string $timeout_or_key, mixed ...$extra_args)
Blocking right pop from list
at line 329
mixed
spop(string $key, int $count = '0')
Remove and return random set member
at line 329
Redis
sRem(string $key, mixed $value, mixed ...$other_values)
Remove members from set
at line 329
Redis
zadd(string $key, array|float $score_or_options, mixed ...$more_scores_and_mems)
Add members to sorted set
at line 329
Redis
zcard(string $key)
Get sorted set cardinality
at line 329
Redis
zcount(string $key, int|string $start, int|string $end)
Count sorted set members by score range
at line 329
Redis
zrangebyscore(string $key, string $min, string $max, array $options = '[]')
Get sorted set members by score range
at line 329
Redis
zrevrangebyscore(string $key, string $max, string $min, array $options = '[]') Get sorted set members by score range (reverse)
No description
at line 329
int
zinterstore(string $output, array $keys, array $options = '[]')
Intersect sorted sets
at line 329
int
zunionstore(string $output, array $keys, array $options = '[]')
Union sorted sets
at line 329
mixed
eval(string $script, int $numberOfKeys, mixed ...$arguments)
Evaluate Lua script
at line 329
mixed
evalsha(string $script, int $numkeys, mixed ...$arguments)
Evaluate Lua script by SHA1
at line 329
mixed
flushdb(mixed ...$arguments)
Flush database
at line 329
mixed
executeRaw(array $parameters)
Execute raw Redis command
at line 329
mixed
pipeline(callable|null $callback = 'null')
Execute commands in a pipeline
at line 329
Redis
smembers(string $key)
Get all set members
at line 329
Redis
hdel(string $key, string $field, string ...$other_fields)
Delete hash fields
at line 329
Redis
zrem(mixed $key, mixed $member, mixed ...$other_members)
Remove sorted set members
at line 329
Redis
hlen(string $key)
Get number of hash fields
at line 329
Redis
hkeys(string $key)
Get all hash field names
at line 329
string
_serialize(mixed $value)
Serialize a value using configured serializer
at line 329
string
_digest(mixed $value)
No description
at line 329
string
_pack(mixed $value)
No description
at line 329
mixed
_unpack(string $value)
No description
at line 329
mixed
acl(string $subcmd, string ...$args)
No description
at line 329
Redis
append(string $key, mixed $value)
No description
at line 329
Redis
auth(mixed $credentials)
No description
at line 329
Redis
bgSave()
No description
at line 329
Redis
bgrewriteaof()
No description
at line 329
Redis
waitaof(int $numlocal, int $numreplicas, int $timeout)
No description
at line 329
Redis
bitcount(string $key, int $start = '0', int $end = '-1', bool $bybit = 'false')
No description
at line 329
Redis
bitop(string $operation, string $deskey, string $srckey, string ...$other_keys)
No description
at line 329
Redis
bitpos(string $key, bool $bit, int $start = '0', int $end = '-1', bool $bybit = 'false')
No description
at line 329
Redis
blPop(array|string $key_or_keys, float|int|string $timeout_or_key, mixed ...$extra_args)
No description
at line 329
Redis
brPop(array|string $key_or_keys, float|int|string $timeout_or_key, mixed ...$extra_args)
No description
at line 329
Redis|string
brpoplpush(string $src, string $dst, float|int $timeout)
No description
at line 329
Redis
bzPopMax(array|string $key, int|string $timeout_or_key, mixed ...$extra_args)
No description
at line 329
Redis
bzPopMin(array|string $key, int|string $timeout_or_key, mixed ...$extra_args)
No description
at line 329
Redis
bzmpop(float $timeout, array $keys, string $from, int $count = '1')
No description
at line 329
Redis
zmpop(array $keys, string $from, int $count = '1')
No description
at line 329
Redis
blmpop(float $timeout, array $keys, string $from, int $count = '1')
No description
at line 329
Redis
lmpop(array $keys, string $from, int $count = '1')
No description
at line 329
bool
clearLastError()
No description
at line 329
mixed
command(string|null $opt = 'null', mixed ...$args)
No description
at line 329
mixed
config(string $operation, array|string|null $key_or_settings = 'null', string|null $value = 'null')
No description
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
at line 329
Redis
copy(string $src, string $dst, array|null $options = 'null')
No description
at line 329
Redis
dbSize()
No description
at line 329
Redis|string
debug(string $key)
No description
at line 329
Redis
decr(string $key, int $by = '1')
No description
at line 329
Redis
decrBy(string $key, int $value)
No description
at line 329
Redis
del(array|string $key, string ...$other_keys)
No description
at line 329
Redis
delex(string $key, array|null $options = 'null')
No description
at line 329
Redis
delifeq(string $key, mixed $value)
No description
at line 329
Redis|string
digest(string $key)
No description
at line 329
Redis|string
dump(string $key)
No description
at line 329
Redis|string
echo(string $str)
No description
at line 329
mixed
eval_ro(string $script_sha, array $args = '[]', int $num_keys = '0')
No description
at line 329
mixed
evalsha_ro(string $sha1, array $args = '[]', int $num_keys = '0')
No description
at line 329
Redis
exec()
No description
at line 329
Redis
exists(mixed $key, mixed ...$other_keys)
No description
at line 329
Redis
expire(string $key, int $timeout, string|null $mode = 'null')
No description
at line 329
Redis
expireAt(string $key, int $timestamp, string|null $mode = 'null')
No description
at line 329
Redis
failover(array|null $to = 'null', bool $abort = 'false', int $timeout = '0')
No description
at line 329
Redis
expiretime(string $key)
No description
at line 329
Redis
pexpiretime(string $key)
No description
at line 329
mixed
fcall(string $fn, array $keys = '[]', array $args = '[]')
No description
at line 329
mixed
fcall_ro(string $fn, array $keys = '[]', array $args = '[]')
No description
at line 329
Redis
flushAll(bool|null $sync = 'null')
No description
at line 329
mixed
flushDB(mixed ...$arguments)
No description
at line 329
Redis|string
function(string $operation, mixed ...$args)
No description
at line 329
Redis
geoadd(string $key, float $lng, float $lat, string $member, mixed ...$other_triples_and_options)
No description
at line 329
Redis
geodist(string $key, string $src, string $dst, string|null $unit = 'null')
No description
at line 329
Redis
geohash(string $key, string $member, string ...$other_members)
No description
at line 329
Redis
geopos(string $key, string $member, string ...$other_members)
No description
at line 329
mixed
georadius(string $key, float $lng, float $lat, float $radius, string $unit, array $options = '[]')
No description
at line 329
mixed
georadius_ro(string $key, float $lng, float $lat, float $radius, string $unit, array $options = '[]')
No description
at line 329
mixed
georadiusbymember(string $key, string $member, float $radius, string $unit, array $options = '[]')
No description
at line 329
mixed
georadiusbymember_ro(string $key, string $member, float $radius, string $unit, array $options = '[]')
No description
at line 329
array
geosearch(string $key, array|string $position, array|int|float $shape, string $unit, array $options = '[]')
No description
at line 329
Redis
geosearchstore(string $dst, string $src, array|string $position, array|int|float $shape, string $unit, array $options = '[]')
No description
at line 329
mixed
getAuth()
No description
at line 329
Redis
getBit(string $key, int $idx)
No description
at line 329
Redis|string
getEx(string $key, array $options = '[]')
No description
at line 329
int
getDBNum()
No description
at line 329
Redis|string
getDel(string $key)
No description
at line 329
string
getHost()
No description
at line 329
null|string
getLastError()
No description
at line 329
int
getMode()
No description
at line 329
mixed
getOption(int $option)
No description
at line 329
null|string
getPersistentID()
No description
at line 329
int
getPort()
No description
at line 329
Redis|string
getRange(string $key, int $start, int $end)
No description
at line 329
Redis|string
lcs(string $key1, string $key2, array|null $options = 'null')
No description
at line 329
float
getReadTimeout()
No description
at line 329
Redis|string
getset(string $key, mixed $value)
No description
at line 329
false|float
getTimeout()
No description
at line 329
array
getTransferredBytes()
No description
at line 329
void
clearTransferredBytes()
No description
at line 329
Redis
getWithMeta(string $key)
No description
at line 329
Redis
hDel(string $key, string $field, string ...$other_fields)
No description
at line 329
Redis
hexpire(string $key, int $ttl, array $fields, string|null $mode = 'null')
No description
at line 329
Redis
hpexpire(string $key, int $ttl, array $fields, string|null $mode = 'null')
No description
at line 329
Redis
hexpireat(string $key, int $time, array $fields, string|null $mode = 'null')
No description
at line 329
Redis
hpexpireat(string $key, int $mstime, array $fields, string|null $mode = 'null')
No description
at line 329
Redis
httl(string $key, array $fields)
No description
at line 329
Redis
hpttl(string $key, array $fields)
No description
at line 329
Redis
hexpiretime(string $key, array $fields)
No description
at line 329
Redis
hpexpiretime(string $key, array $fields)
No description
at line 329
Redis
hpersist(string $key, array $fields)
No description
at line 329
Redis
hExists(string $key, string $field)
No description
at line 329
mixed
hGet(string $key, string $member)
No description
at line 329
Redis
hGetAll(string $key)
No description
at line 329
mixed
hGetWithMeta(string $key, string $member)
No description
at line 329
Redis
hgetdel(string $key, array $fields)
No description
at line 329
Redis
hgetex(string $key, array $fields, string|array|null $expiry = 'null')
No description
at line 329
Redis
hIncrBy(string $key, string $field, int $value)
No description
at line 329
Redis
hIncrByFloat(string $key, string $field, float $value)
No description
at line 329
Redis
hKeys(string $key)
No description
at line 329
Redis
hLen(string $key)
No description
at line 329
Redis
hMget(string $key, array $fields)
No description
at line 329
Redis
hMset(string $key, array $fieldValues)
No description
at line 329
Redis|string
hRandField(string $key, array|null $options = 'null')
No description
at line 329
Redis
hSet(string $key, mixed ...$fields_and_vals)
No description
at line 329
Redis
hSetNx(string $hash, string $key, mixed $value)
No description
at line 329
Redis
hsetex(string $key, array $fields, array|null $expiry = 'null')
No description
at line 329
Redis
hStrLen(string $key, string $field)
No description
at line 329
Redis
hVals(string $key)
No description
at line 329
Redis
incr(string $key, int $by = '1')
No description
at line 329
Redis
incrBy(string $key, int $value)
No description
at line 329
Redis
incrByFloat(string $key, float $value)
No description
at line 329
Redis
info(string ...$sections)
No description
at line 329
bool
isConnected()
No description
at line 329
void
keys(string $pattern)
No description
at line 329
void
lInsert(string $key, string $pos, mixed $pivot, mixed $value)
No description
at line 329
Redis
lLen(string $key)
No description
at line 329
Redis|string
lMove(string $src, string $dst, string $wherefrom, string $whereto)
No description
at line 329
Redis|string
blmove(string $src, string $dst, string $wherefrom, string $whereto, float $timeout)
No description
at line 329
Redis|string
lPop(string $key, int $count = '0')
No description
at line 329
Redis
lPos(string $key, mixed $value, array|null $options = 'null')
No description
at line 329
Redis
lPush(string $key, mixed ...$elements)
No description
at line 329
Redis
rPush(string $key, mixed ...$elements)
No description
at line 329
Redis
lPushx(string $key, mixed $value)
No description
at line 329
Redis
rPushx(string $key, mixed $value)
No description
at line 329
Redis
lSet(string $key, int $index, mixed $value)
No description
at line 329
int
lastSave()
No description
at line 329
mixed
lindex(string $key, int $index)
No description
at line 329
Redis
lrange(string $key, int $start, int $end)
No description
at line 329
Redis
ltrim(string $key, int $start, int $end)
No description
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
at line 329
Redis
move(string $key, int $index)
No description
at line 329
Redis
mset(array $key_values)
No description
at line 329
Redis
msetex(array $key_values, int|float|array|null $expiry = 'null')
No description
at line 329
Redis
msetnx(array $key_values)
No description
at line 329
Redis
multi(int $value = '1')
No description
at line 329
Redis|string
object(string $subcommand, string $key)
No description
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
at line 329
Redis
persist(string $key)
No description
at line 329
bool
pexpire(string $key, int $timeout, string|null $mode = 'null')
No description
at line 329
Redis
pexpireAt(string $key, int $timestamp, string|null $mode = 'null')
No description
at line 329
Redis
pfadd(string $key, array $elements)
No description
at line 329
Redis
pfcount(array|string $key_or_keys)
No description
at line 329
Redis
pfmerge(string $dst, array $srckeys)
No description
at line 329
Redis|string
ping(string|null $message = 'null')
No description
at line 329
Redis
psetex(string $key, int $expire, mixed $value)
No description
at line 329
void
psubscribe(array|string $channels, Closure $callback)
No description
at line 329
Redis
pttl(string $key)
No description
at line 329
Redis
publish(string $channel, string $message)
No description
at line 329
mixed
pubsub(string $command, mixed $arg = 'null')
No description
at line 329
Redis
punsubscribe(array $patterns)
No description
at line 329
Redis|string
rPop(string $key, int $count = '0')
No description
at line 329
Redis|string
randomKey()
No description
at line 329
mixed
rawcommand(string $command, mixed ...$args)
No description
at line 329
Redis
rename(string $old_name, string $new_name)
No description
at line 329
Redis
renameNx(string $key_src, string $key_dst)
No description
at line 329
Redis
restore(string $key, int $ttl, string $value, array|null $options = 'null')
No description
at line 329
mixed
role()
No description
at line 329
Redis|string
rpoplpush(string $srckey, string $dstkey)
No description
at line 329
Redis
sAdd(string $key, mixed $value, mixed ...$other_values)
No description
at line 329
int
sAddArray(string $key, array $values)
No description
at line 329
Redis
sDiff(string $key, string ...$other_keys)
No description
at line 329
Redis
sDiffStore(string $dst, string $key, string ...$other_keys)
No description
at line 329
Redis
sInter(array|string $key, string ...$other_keys)
No description
at line 329
Redis
sintercard(array $keys, int $limit = '-1')
No description
at line 329
Redis
sInterStore(array|string $key, string ...$other_keys)
No description
at line 329
Redis
sMembers(string $key)
No description
at line 329
Redis
sMisMember(string $key, string $member, string ...$other_members)
No description
at line 329
Redis
sMove(string $src, string $dst, mixed $value)
No description
at line 329
mixed
sPop(string $key, int $count = '0')
No description
at line 329
mixed
sRandMember(string $key, int $count = '0')
No description
at line 329
Redis
sUnion(string $key, string ...$other_keys)
No description
at line 329
Redis
sUnionStore(string $dst, string $key, string ...$other_keys)
No description
at line 329
Redis
save()
No description
at line 329
Redis
scard(string $key)
No description
at line 329
mixed
script(string $command, mixed ...$args)
No description
at line 329
Redis
select(int $db)
No description
at line 329
false|string
serverName()
No description
at line 329
false|string
serverVersion()
No description
at line 329
Redis
setBit(string $key, int $idx, bool $value)
No description
at line 329
Redis
setRange(string $key, int $index, string $value)
No description
at line 329
bool
setOption(int $option, mixed $value)
No description
at line 329
Redis
setex(string $key, int $expire, mixed $value)
No description
at line 329
Redis
sismember(string $key, mixed $value)
No description
at line 329
Redis
replicaof(string|null $host = 'null', int $port = '6379')
No description
at line 329
Redis
touch(array|string $key_or_array, string ...$more_keys)
No description
at line 329
mixed
slowlog(string $operation, int $length = '0')
No description
at line 329
mixed
sort(string $key, array|null $options = 'null')
No description
at line 329
mixed
sort_ro(string $key, array|null $options = 'null')
No description
at line 329
Redis
srem(string $key, mixed $value, mixed ...$other_values)
No description
at line 329
Redis
strlen(string $key)
No description
at line 329
void
subscribe(array|string $channels, Closure $callback)
No description
at line 329
Redis
sunsubscribe(array $channels)
No description
at line 329
Redis
swapdb(int $src, int $dst)
No description
at line 329
Redis
time()
No description
at line 329
Redis
ttl(string $key)
No description
at line 329
Redis
type(string $key)
No description
at line 329
Redis
unlink(array|string $key, string ...$other_keys)
No description
at line 329
Redis
unsubscribe(array $channels)
No description
at line 329
Redis
unwatch()
No description
at line 329
Redis
vadd(string $key, array $values, mixed $element, array|null $options = 'null')
No description
at line 329
Redis
vcard(string $key)
No description
at line 329
Redis
vdim(string $key)
No description
at line 329
Redis
vemb(string $key, mixed $member, bool $raw = 'false')
No description
at line 329
Redis|string
vgetattr(string $key, mixed $member, bool $decode = 'true')
No description
at line 329
Redis
vinfo(string $key)
No description
at line 329
Redis
vismember(string $key, mixed $member)
No description
at line 329
Redis
vlinks(string $key, mixed $member, bool $withscores = 'false')
No description
at line 329
Redis|string
vrandmember(string $key, int $count = '0')
No description
at line 329
Redis
vrange(string $key, string $min, string $max, int $count = '-1')
No description
at line 329
Redis
vrem(string $key, mixed $member)
No description
at line 329
Redis
vsetattr(string $key, mixed $member, array|string $attributes)
No description
at line 329
Redis
vsim(string $key, mixed $member, array|null $options = 'null')
No description
at line 329
Redis
watch(array|string $key, string ...$other_keys)
No description
at line 329
false|int
wait(int $numreplicas, int $timeout)
No description
at line 329
false|int
xack(string $key, string $group, array $ids)
No description
at line 329
Redis|string
xadd(string $key, string $id, array $values, int $maxlen = '0', bool $approx = 'false', bool $nomkstream = 'false')
No description
at line 329
Redis
xautoclaim(string $key, string $group, string $consumer, int $min_idle, string $start, int $count = '-1', bool $justid = 'false')
No description
at line 329
Redis
xclaim(string $key, string $group, string $consumer, int $min_idle, array $ids, array $options)
No description
at line 329
Redis
xdel(string $key, array $ids)
No description
at line 329
Redis
xdelex(string $key, array $ids, string|null $mode = 'null')
No description
at line 329
mixed
xgroup(string $operation, string|null $key = 'null', string|null $group = 'null', string|null $id_or_consumer = 'null', bool $mkstream = 'false', int $entries_read = '-2')
No description
at line 329
mixed
xinfo(string $operation, string|null $arg1 = 'null', string|null $arg2 = 'null', int $count = '-1')
No description
at line 329
Redis
xlen(string $key)
No description
at line 329
Redis
xpending(string $key, string $group, string|null $start = 'null', string|null $end = 'null', int $count = '-1', string|null $consumer = 'null')
No description
at line 329
Redis
xrange(string $key, string $start, string $end, int $count = '-1')
No description
at line 329
Redis
xread(array $streams, int $count = '-1', int $block = '-1')
No description
at line 329
Redis
xreadgroup(string $group, string $consumer, array $streams, int $count = '1', int $block = '1')
No description
at line 329
Redis
xrevrange(string $key, string $end, string $start, int $count = '-1')
No description
at line 329
Redis
xtrim(string $key, string $threshold, bool $approx = 'false', bool $minid = 'false', int $limit = '-1')
No description
at line 329
Redis
zAdd(string $key, array|float $score_or_options, mixed ...$more_scores_and_mems)
No description
at line 329
Redis
zCard(string $key)
No description
at line 329
Redis
zCount(string $key, int|string $start, int|string $end)
No description
at line 329
Redis
zIncrBy(string $key, float $value, mixed $member)
No description
at line 329
Redis
zLexCount(string $key, string $min, string $max)
No description
at line 329
Redis
zMscore(string $key, mixed $member, mixed ...$other_members)
No description
at line 329
Redis
zPopMax(string $key, int|null $count = 'null')
No description
at line 329
Redis
zPopMin(string $key, int|null $count = 'null')
No description
at line 329
Redis
zRange(string $key, string|int $start, string|int $end, array|bool|null $options = 'null')
No description
at line 329
Redis
zRangeByLex(string $key, string $min, string $max, int $offset = '-1', int $count = '-1')
No description
at line 329
Redis
zRangeByScore(string $key, string $min, string $max, array $options = '[]')
No description
at line 329
Redis
zrangestore(string $dstkey, string $srckey, string $start, string $end, array|bool|null $options = 'null')
No description
at line 329
Redis|string
zRandMember(string $key, array|null $options = 'null')
No description
at line 329
Redis
zRank(string $key, mixed $member)
No description
at line 329
Redis
zRem(mixed $key, mixed $member, mixed ...$other_members)
No description
at line 329
Redis
zRemRangeByLex(string $key, string $min, string $max)
No description
at line 329
Redis
zRemRangeByRank(string $key, int $start, int $end)
No description
at line 329
Redis
zRemRangeByScore(string $key, string $start, string $end)
No description
at line 329
Redis
zRevRange(string $key, int $start, int $end, mixed $scores = 'null')
No description
at line 329
Redis
zRevRangeByLex(string $key, string $max, string $min, int $offset = '-1', int $count = '-1')
No description
at line 329
Redis
zRevRangeByScore(string $key, string $max, string $min, array $options = '[]')
No description
at line 329
Redis
zRevRank(string $key, mixed $member)
No description
at line 329
Redis
zScore(string $key, mixed $member)
No description
at line 329
Redis
zdiff(array $keys, array|null $options = 'null')
No description
at line 329
Redis
zdiffstore(string $dst, array $keys)
No description
at line 329
Redis
zinter(array $keys, array|null $weights = 'null', array|null $options = 'null')
No description
at line 329
Redis
zintercard(array $keys, int $limit = '-1')
No description
at line 329
Redis
zunion(array $keys, array|null $weights = 'null', array|null $options = 'null')
No description