\Hazaar\Cache\Backend
Redis
The Redis cache backend.

This is a nice, reliable caching backend that allows for clustering using the Redis clustering feature.

Available config options:

  • server – The redis server to connect to. Currently only a single server is supported. Default: localhost.
  • port – The port to connect to the server on. Default: 6379

Tags

Since

2.2.0

Summary
Methods Properties Constants
cmd
get
has
set
No constants
Properties
$buffer
$buffer
$delim
$delim
$garbage
$garbage
$local
$local
$master
$master
$namespace
$namespace
$offset
$offset
$role
$role
$socket
$socket
$update_expire
$update_expire
$weight
$weight
Methods
Static
available()
available()
clear()
clear()
close()
close()
cmd()
cmd($cmds, $use_master = false)

Parameters

$cmds

No description

$use_master

No description

connect()
connect($host, $port = 6379)

Parameters

$host

No description

$port

No description

decode()
decode($socket, $chunk = null) : \array|integer|null|string
Decodes a RESP data chunk

Tags

Throws

Exception\RedisError

Parameters

$socket\Hazaar\Socket\Client

The socket we are currently using

$chunkmixed

The current chunk to start decoding

Returns

\array|integer|null|string
encode()
encode($data)

Parameters

$data

No description

get()
get($key)

Parameters

$key

No description

getChunk()
getChunk($socket, $bytes = null)

Parameters

$socket

No description

$bytes

No description

has()
has($key)

Parameters

$key

No description

init()
init($namespace)

Parameters

$namespace

No description

keepalive()
keepalive()
remove()
remove($key)

Parameters

$key

No description

select()
select($db)

Parameters

$db

No description

set()
set($key, $value, $timeout = null)

Parameters

$key

No description

$value

No description

$timeout

No description

toArray()
toArray()