Redis

March 27, 2022 ยท View on GitHub

Cache using a redis server. Redis is an open source, in-memory data structure store, used as a database, cache and message broker.

Uses the Redis PHP extension.

You must provide a Redis object to the constructor.

use Desarrolla2\Cache\Redis as RedisCache;
use Redis;

$client = new Redis();
$cache = new RedisCache($client);

Installation

Requires the redis PHP extension from PECL.

pickle install redis

Options

nametypedefault
ttlintnullMaximum time to live in seconds
prefixstring""Key prefix

Packer

By default the SerializePacker is used.