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);Requires the redis PHP extension from PECL.
pickle install redis
| name | type | default | |
|---|---|---|---|
| ttl | int | null | Maximum time to live in seconds |
| prefix | string | "" | Key prefix |
By default the SerializePacker is used.