RedisCluster
class RedisCluster (View source)
Constants
| OPT_SLAVE_FAILOVER |
Used to configure how |
| FAILOVER_NONE |
Never read from replicas. |
| FAILOVER_ERROR |
Attempt to read from replicas when the primary errors out or is down. |
| FAILOVER_DISTRIBUTE |
Distribute readonly commands at random between the primary and
replica(s). |
| FAILOVER_DISTRIBUTE_SLAVES |
Distribute readonly commands between the replicas only. |
Methods
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
Return the position of the first bit set to 0 or 1 in a string.
No description
No description
No description
Move an element from one list into another.
Move an element from one list to another, blocking up to a timeout until an element is available.
No description
No description
No description
No description
No description
No description
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 a key conditionally based on its value or hash digest
Delete a key if it's equal to the specified value. This command is specific to Valkey >= 9.0
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
Retrieve information about the connected redis-server. If no arguments are passed to this function, redis will return every info field. Alternatively you may pass a specific section you want returned (e.g. 'server', or 'memory') to receive only information pertaining to that section.
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
PING an instance in the redis cluster.
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
Check if an element is a member of a vectorset
No description
No description
Retreive a lexographical range of elements from a vector 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
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
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
__construct(string|null $name, array|null $seeds = null, int|float $timeout = 0, int|float $read_timeout = 0, bool $persistent = false, mixed $auth = null, array|null $context = null)
No description
string _compress(string $value)
string _uncompress(string $value)
No description
bool|string _serialize(mixed $value)
No description
mixed _unserialize(string $value)
No description
string _pack(mixed $value)
No description
string _digest(mixed $value)
No description
mixed _unpack(string $value)
No description
bool|string _prefix(string $key)
No description
array _masters()
No description
string|null _redir()
No description
mixed acl(string|array $key_or_address, string $subcmd, string ...$args)
No description
RedisCluster|bool|int append(string $key, mixed $value)
No description
RedisCluster|bool bgrewriteaof(string|array $key_or_address)
No description
RedisCluster|int|false wait(string|array $key_or_address, int $numreplicas, int $timeout)
No description
RedisCluster|array|false waitaof(string|array $key_or_address, int $numlocal, int $numreplicas, int $timeout)
No description
RedisCluster|bool bgsave(string|array $key_or_address)
No description
RedisCluster|bool|int bitcount(string $key, int $start = 0, int $end = -1, bool $bybit = false)
No description
RedisCluster|bool|int bitop(string $operation, string $deskey, string $srckey, string ...$otherkeys)
No description
RedisCluster|int|false bitpos(string $key, bool $bit, int $start = 0, int $end = -1, bool $bybit = false)
Return the position of the first bit set to 0 or 1 in a string.
RedisCluster|array|null|false blpop(string|array $key, string|float|int $timeout_or_key, mixed ...$extra_args)
No description
RedisCluster|array|null|false brpop(string|array $key, string|float|int $timeout_or_key, mixed ...$extra_args)
No description
mixed brpoplpush(string $srckey, string $deskey, int $timeout)
No description
RedisCluster|string|false lmove(string $src, string $dst, string $wherefrom, string $whereto)
Move an element from one list into another.
RedisCluster|string|false blmove(string $src, string $dst, string $wherefrom, string $whereto, float $timeout)
Move an element from one list to another, blocking up to a timeout until an element is available.
array bzpopmax(string|array $key, string|int $timeout_or_key, mixed ...$extra_args)
No description
array bzpopmin(string|array $key, string|int $timeout_or_key, mixed ...$extra_args)
No description
RedisCluster|array|null|false bzmpop(float $timeout, array $keys, string $from, int $count = 1)
No description
RedisCluster|array|null|false zmpop(array $keys, string $from, int $count = 1)
No description
RedisCluster|array|null|false blmpop(float $timeout, array $keys, string $from, int $count = 1)
No description
RedisCluster|array|null|false lmpop(array $keys, string $from, int $count = 1)
No description
bool clearlasterror()
No description
array|string|bool client(string|array $key_or_address, string $subcommand, string|null $arg = null)
No description
bool close()
No description
mixed cluster(string|array $key_or_address, string $command, mixed ...$extra_args)
No description
mixed command(mixed ...$extra_args)
No description
mixed config(string|array $key_or_address, string $subcommand, mixed ...$extra_args)
No description
RedisCluster|int dbsize(string|array $key_or_address)
No description
RedisCluster|bool copy(string $src, string $dst, array|null $options = null)
No description
RedisCluster|int|false decr(string $key, int $by = 1)
No description
RedisCluster|int|false decrby(string $key, int $value)
No description
float decrbyfloat(string $key, float $value)
No description
RedisCluster|int|false del(array|string $key, string ...$other_keys)
No description
RedisCluster|int|false delex(string $key, array|null $options = null)
Delete a key conditionally based on its value or hash digest
RedisCluster|int|false delifeq(string $key, mixed $value)
Delete a key if it's equal to the specified value. This command is specific to Valkey >= 9.0
bool discard()
No description
RedisCluster|string|false dump(string $key)
No description
RedisCluster|string|false echo(string|array $key_or_address, string $msg)
No description
mixed eval(string $script, array $args = [], int $num_keys = 0)
No description
mixed eval_ro(string $script, array $args = [], int $num_keys = 0)
No description
mixed evalsha(string $script_sha, array $args = [], int $num_keys = 0)
No description
mixed evalsha_ro(string $script_sha, array $args = [], int $num_keys = 0)
No description
array|false exec()
No description
RedisCluster|int|bool exists(mixed $key, mixed ...$other_keys)
No description
RedisCluster|int|bool touch(mixed $key, mixed ...$other_keys)
No description
RedisCluster|bool expire(string $key, int $timeout, string|null $mode = null)
No description
RedisCluster|bool expireat(string $key, int $timestamp, string|null $mode = null)
No description
RedisCluster|int|false expiretime(string $key)
No description
RedisCluster|int|false pexpiretime(string $key)
No description
RedisCluster|bool flushall(string|array $key_or_address, bool $async = false)
No description
RedisCluster|bool flushdb(string|array $key_or_address, bool $async = false)
No description
RedisCluster|int|false geoadd(string $key, float $lng, float $lat, string $member, mixed ...$other_triples_and_options)
No description
RedisCluster|float|false geodist(string $key, string $src, string $dest, string|null $unit = null)
No description
RedisCluster|array|false geohash(string $key, string $member, string ...$other_members)
No description
RedisCluster|array|false geopos(string $key, string $member, string ...$other_members)
No description
mixed georadius(string $key, float $lng, float $lat, float $radius, string $unit, array $options = [])
No description
mixed georadius_ro(string $key, float $lng, float $lat, float $radius, string $unit, array $options = [])
No description
mixed georadiusbymember(string $key, string $member, float $radius, string $unit, array $options = [])
No description
mixed georadiusbymember_ro(string $key, string $member, float $radius, string $unit, array $options = [])
No description
RedisCluster|array geosearch(string $key, array|string $position, array|int|float $shape, string $unit, array $options = [])
No description
RedisCluster|array|int|false geosearchstore(string $dst, string $src, array|string $position, array|int|float $shape, string $unit, array $options = [])
No description
mixed get(string $key)
No description
mixed getdel(string $key)
No description
RedisCluster|array|false getWithMeta(string $key)
No description
RedisCluster|string|false getex(string $key, array $options = [])
No description
RedisCluster|int|false getbit(string $key, int $value)
No description
string|null getlasterror()
No description
int getmode()
No description
mixed getoption(int $option)
No description
RedisCluster|string|false getrange(string $key, int $start, int $end)
No description
RedisCluster|string|array|int|false lcs(string $key1, string $key2, array|null $options = null)
No description
RedisCluster|string|bool getset(string $key, mixed $value)
No description
array|false gettransferredbytes()
No description
void cleartransferredbytes()
No description
RedisCluster|int|false hdel(string $key, string $member, string ...$other_members)
No description
RedisCluster|bool hexists(string $key, string $member)
No description
mixed hget(string $key, string $member)
No description
RedisCluster|array|false hgetall(string $key)
No description
mixed hgetWithMeta(string $key, string $member)
No description
RedisCluster|int|false hincrby(string $key, string $member, int $value)
No description
RedisCluster|float|false hincrbyfloat(string $key, string $member, float $value)
No description
RedisCluster|array|false hkeys(string $key)
No description
RedisCluster|int|false hlen(string $key)
No description
RedisCluster|array|false hmget(string $key, array $keys)
No description
RedisCluster|array|false hgetex(string $key, array $fields, string|array|null $expiry = null)
No description
RedisCluster|int|false hsetex(string $key, array $fields, array|null $expiry = null)
No description
RedisCluster|array|false hgetdel(string $key, array $fields)
No description
RedisCluster|bool hmset(string $key, array $key_values)
No description
array|bool hscan(string $key, null|int|string $iterator, string|null $pattern = null, int $count = 0)
No description
RedisCluster|int|false expiremember(string $key, string $field, int $ttl, string|null $unit = null)
No description
RedisCluster|int|false expirememberat(string $key, string $field, int $timestamp)
No description
RedisCluster|string|array hrandfield(string $key, array|null $options = null)
No description
RedisCluster|int|false hset(string $key, string $member, mixed $value)
No description
RedisCluster|bool hsetnx(string $key, string $member, mixed $value)
No description
RedisCluster|int|false hstrlen(string $key, string $field)
No description
RedisCluster|array|false hexpire(string $key, int $ttl, array $fields, string|null $mode = NULL)
No description
RedisCluster|array|false hpexpire(string $key, int $ttl, array $fields, string|null $mode = NULL)
No description
RedisCluster|array|false hexpireat(string $key, int $time, array $fields, string|null $mode = NULL)
No description
RedisCluster|array|false hpexpireat(string $key, int $mstime, array $fields, string|null $mode = NULL)
No description
RedisCluster|array|false httl(string $key, array $fields)
No description
RedisCluster|array|false hpttl(string $key, array $fields)
No description
RedisCluster|array|false hexpiretime(string $key, array $fields)
No description
RedisCluster|array|false hpexpiretime(string $key, array $fields)
No description
RedisCluster|array|false hpersist(string $key, array $fields)
No description
RedisCluster|array|false hvals(string $key)
No description
RedisCluster|int|false incr(string $key, int $by = 1)
No description
RedisCluster|int|false incrby(string $key, int $value)
No description
RedisCluster|float|false incrbyfloat(string $key, float $value)
No description
RedisCluster|array|false info(string|array $key_or_address, string ...$sections)
Retrieve information about the connected redis-server. If no arguments are passed to this function, redis will return every info field. Alternatively you may pass a specific section you want returned (e.g. 'server', or 'memory') to receive only information pertaining to that section.
If connected to Redis server >= 7.0.0 you may pass multiple optional sections.
RedisCluster|array|false keys(string $pattern)
No description
RedisCluster|int|false lastsave(string|array $key_or_address)
No description
RedisCluster|string|bool lget(string $key, int $index)
No description
mixed lindex(string $key, int $index)
No description
RedisCluster|int|false linsert(string $key, string $pos, mixed $pivot, mixed $value)
No description
RedisCluster|int|bool llen(string $key)
No description
RedisCluster|bool|string|array lpop(string $key, int $count = 0)
No description
RedisCluster|null|bool|int|array lpos(string $key, mixed $value, array|null $options = null)
No description
RedisCluster|int|bool lpush(string $key, mixed $value, mixed ...$other_values)
No description
RedisCluster|int|bool lpushx(string $key, mixed $value)
No description
RedisCluster|array|false lrange(string $key, int $start, int $end)
No description
RedisCluster|int|bool lrem(string $key, mixed $value, int $count = 0)
No description
RedisCluster|bool lset(string $key, int $index, mixed $value)
No description
RedisCluster|bool ltrim(string $key, int $start, int $end)
No description
RedisCluster|array|false mget(array $keys)
No description
RedisCluster|bool mset(array $key_values)
No description
RedisCluster|array|false msetnx(array $key_values)
No description
Redis|int|false msetex(array $key_vals, int|float|array|null $expiry = null)
No description
RedisCluster|bool multi(int $value = Redis::MULTI)
No description
RedisCluster|int|string|false object(string $subcommand, string $key)
No description
RedisCluster|bool persist(string $key)
No description
RedisCluster|bool pexpire(string $key, int $timeout, string|null $mode = null)
No description
RedisCluster|bool pexpireat(string $key, int $timestamp, string|null $mode = null)
No description
RedisCluster|bool pfadd(string $key, array $elements)
No description
RedisCluster|int|false pfcount(string $key)
No description
RedisCluster|bool pfmerge(string $key, array $keys)
No description
mixed ping(string|array $key_or_address, string|null $message = null)
PING an instance in the redis cluster.
RedisCluster|bool psetex(string $key, int $timeout, string $value)
No description
void psubscribe(array $patterns, callable $callback)
No description
RedisCluster|int|false pttl(string $key)
No description
RedisCluster|bool|int publish(string $channel, string $message)
No description
mixed pubsub(string|array $key_or_address, string ...$values)
No description
bool|array punsubscribe(string $pattern, string ...$other_patterns)
No description
RedisCluster|bool|string randomkey(string|array $key_or_address)
No description
mixed rawcommand(string|array $key_or_address, string $command, mixed ...$args)
No description
RedisCluster|bool rename(string $key_src, string $key_dst)
No description
RedisCluster|bool renamenx(string $key, string $newkey)
No description
RedisCluster|bool restore(string $key, int $timeout, string $value, array|null $options = null)
No description
mixed role(string|array $key_or_address)
No description
RedisCluster|bool|string|array rpop(string $key, int $count = 0)
No description
RedisCluster|bool|string rpoplpush(string $src, string $dst)
No description
RedisCluster|int|false rpush(string $key, mixed ...$elements)
No description
RedisCluster|bool|int rpushx(string $key, string $value)
No description
RedisCluster|int|false sadd(string $key, mixed $value, mixed ...$other_values)
No description
RedisCluster|bool|int saddarray(string $key, array $values)
No description
RedisCluster|bool save(string|array $key_or_address)
No description
bool|array scan(null|int|string $iterator, string|array $key_or_address, string|null $pattern = null, int $count = 0)
No description
RedisCluster|int|false scard(string $key)
No description
mixed script(string|array $key_or_address, mixed ...$args)
No description
RedisCluster|array|false sdiff(string $key, string ...$other_keys)
No description
RedisCluster|int|false sdiffstore(string $dst, string $key, string ...$other_keys)
No description
RedisCluster|string|bool set(string $key, mixed $value, mixed $options = null)
No description
RedisCluster|int|false setbit(string $key, int $offset, bool $onoff)
No description
RedisCluster|bool setex(string $key, int $expire, mixed $value)
No description
RedisCluster|bool setnx(string $key, mixed $value)
No description
bool setoption(int $option, mixed $value)
No description
RedisCluster|int|false setrange(string $key, int $offset, string $value)
No description
RedisCluster|array|false sinter(array|string $key, string ...$other_keys)
No description
RedisCluster|int|false sintercard(array $keys, int $limit = -1)
No description
RedisCluster|int|false sinterstore(array|string $key, string ...$other_keys)
No description
RedisCluster|bool sismember(string $key, mixed $value)
No description
RedisCluster|array|false smismember(string $key, string $member, string ...$other_members)
No description
mixed slowlog(string|array $key_or_address, mixed ...$args)
No description
RedisCluster|array|false smembers(string $key)
No description
RedisCluster|bool smove(string $src, string $dst, string $member)
No description
RedisCluster|array|bool|int|string sort(string $key, array|null $options = null)
No description
RedisCluster|array|bool|int|string sort_ro(string $key, array|null $options = null)
No description
RedisCluster|string|array|false spop(string $key, int $count = 0)
No description
RedisCluster|string|array|false srandmember(string $key, int $count = 0)
No description
RedisCluster|int|false srem(string $key, mixed $value, mixed ...$other_values)
No description
array|false sscan(string $key, null|int|string $iterator, string|null $pattern = null, int $count = 0)
No description
RedisCluster|int|false strlen(string $key)
No description
void subscribe(array $channels, callable $cb)
No description
RedisCluster|bool|array sunion(string $key, string ...$other_keys)
No description
RedisCluster|int|false sunionstore(string $dst, string $key, string ...$other_keys)
No description
RedisCluster|bool|array time(string|array $key_or_address)
No description
RedisCluster|int|false ttl(string $key)
No description
RedisCluster|int|false type(string $key)
No description
bool|array unsubscribe(array $channels)
No description
RedisCluster|int|false unlink(array|string $key, string ...$other_keys)
No description
bool unwatch()
No description
RedisCluster|bool watch(string $key, string ...$other_keys)
No description
RedisCluster|int|false vadd(string $key, array $values, mixed $element, array|null $options = null)
No description
RedisCluster|array|false vsim(string $key, mixed $member, array|null $options = null)
No description
RedisCluster|int|false vcard(string $key)
No description
RedisCluster|int|false vdim(string $key)
No description
RedisCluster|array|false vinfo(string $key)
No description
RedisCluster|bool vismember(string $key, mixed $member)
Check if an element is a member of a vectorset
RedisCluster|array|false vemb(string $key, mixed $member, bool $raw = false)
No description
RedisCluster|array|string|false vrandmember(string $key, int $count = 0)
No description
RedisCluster|array|false vrange(string $key, string $min, string $max, int $count = -1)
Retreive a lexographical range of elements from a vector set
RedisCluster|int|false vrem(string $key, mixed $member)
No description
RedisCluster|array|false vlinks(string $key, mixed $member, bool $withscores = false)
No description
RedisCluster|array|string|false vgetattr(string $key, mixed $member, bool $decode = true)
No description
RedisCluster|int|false vsetattr(string $key, mixed $member, array|string $attributes)
No description
RedisCluster|int|false xack(string $key, string $group, array $ids)
No description
RedisCluster|string|false xadd(string $key, string $id, array $values, int $maxlen = 0, bool $approx = false)
No description
RedisCluster|string|array|false xclaim(string $key, string $group, string $consumer, int $min_iddle, array $ids, array $options)
No description
RedisCluster|int|false xdel(string $key, array $ids)
No description
Relay|array|false xdelex(string $key, array $ids, string|null $mode = null)
No description
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
RedisCluster|bool|array xautoclaim(string $key, string $group, string $consumer, int $min_idle, string $start, int $count = -1, bool $justid = false)
No description
mixed xinfo(string $operation, string|null $arg1 = null, string|null $arg2 = null, int $count = -1)
No description
RedisCluster|int|false xlen(string $key)
No description
RedisCluster|array|false xpending(string $key, string $group, string|null $start = null, string|null $end = null, int $count = -1, string|null $consumer = null)
No description
RedisCluster|bool|array xrange(string $key, string $start, string $end, int $count = -1)
No description
RedisCluster|bool|array xread(array $streams, int $count = -1, int $block = -1)
No description
RedisCluster|bool|array xreadgroup(string $group, string $consumer, array $streams, int $count = 1, int $block = 1)
No description
RedisCluster|bool|array xrevrange(string $key, string $start, string $end, int $count = -1)
No description
RedisCluster|int|false xtrim(string $key, int $maxlen, bool $approx = false, bool $minid = false, int $limit = -1)
No description
RedisCluster|int|float|false zadd(string $key, array|float $score_or_options, mixed ...$more_scores_and_mems)
No description
RedisCluster|int|false zcard(string $key)
No description
RedisCluster|int|false zcount(string $key, string $start, string $end)
No description
RedisCluster|float|false zincrby(string $key, float $value, string $member)
No description
RedisCluster|int|false zinterstore(string $dst, array $keys, array|null $weights = null, string|null $aggregate = null)
No description
RedisCluster|int|false zintercard(array $keys, int $limit = -1)
No description
RedisCluster|int|false zlexcount(string $key, string $min, string $max)
No description
RedisCluster|bool|array zpopmax(string $key, int|null $value = null)
No description
RedisCluster|bool|array zpopmin(string $key, int|null $value = null)
No description
RedisCluster|array|bool zrange(string $key, mixed $start, mixed $end, array|bool|null $options = null)
No description
RedisCluster|int|false zrangestore(string $dstkey, string $srckey, int $start, int $end, array|bool|null $options = null)
No description
RedisCluster|string|array zrandmember(string $key, array|null $options = null)
No description
RedisCluster|array|false zrangebylex(string $key, string $min, string $max, int $offset = -1, int $count = -1)
No description
RedisCluster|array|false zrangebyscore(string $key, string $start, string $end, array $options = [])
No description
RedisCluster|int|false zrank(string $key, mixed $member)
No description
RedisCluster|int|false zrem(string $key, string $value, string ...$other_values)
No description
RedisCluster|int|false zremrangebylex(string $key, string $min, string $max)
No description
RedisCluster|int|false zremrangebyrank(string $key, string $min, string $max)
No description
RedisCluster|int|false zremrangebyscore(string $key, string $min, string $max)
No description
RedisCluster|bool|array zrevrange(string $key, string $min, string $max, array|null $options = null)
No description
RedisCluster|bool|array zrevrangebylex(string $key, string $min, string $max, array|null $options = null)
No description
RedisCluster|bool|array zrevrangebyscore(string $key, string $min, string $max, array|null $options = null)
No description
RedisCluster|int|false zrevrank(string $key, mixed $member)
No description
RedisCluster|bool|array zscan(string $key, null|int|string $iterator, string|null $pattern = null, int $count = 0)
No description
RedisCluster|float|false zscore(string $key, mixed $member)
No description
RedisCluster|array|false zmscore(string $key, mixed $member, mixed ...$other_members)
No description
RedisCluster|int|false zunionstore(string $dst, array $keys, array|null $weights = null, string|null $aggregate = null)
No description
RedisCluster|array|false zinter(array $keys, array|null $weights = null, array|null $options = null)
No description
RedisCluster|int|false zdiffstore(string $dst, array $keys)
No description
RedisCluster|array|false zunion(array $keys, array|null $weights = null, array|null $options = null)
No description
RedisCluster|array|false zdiff(array $keys, array|null $options = null)
No description
RedisCluster|string|false digest(string $key)
No description