Simple PHP Cache library
// Array will not persist
// it will be removed after execution
$storage = new ArrayStorage();
// Or using the Redis PHP extension
// $redis = new \Redis();
// $redis->connect('127.0.0.1', 6379);
// $storage = new RedisExtensionStorage($redis, 'prefix');
$repository = new Repository($storage);
// set value
$repository->set('key', 'value');
// read value
$value = $repository->read('key');
// read and delete value
$value = $repository->readAndDelete('key');
// check if value exists
$exists = $repository->has('key');