Predis

June 19, 2018 ยท 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.

You must provide a Predis\Client object to the constructor.

use Desarrolla2\Cache\Predis as PredisCache;
use Predis\Client as PredisClient;

$client = new PredisClient('tcp://localhost:6379');
$cache = new PredisCache($client);

Installation

Requires the predis library.

composer require predis/predis

Options

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

Packer

By default the SerializePacker is used.