mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-19 06:18:07 +01:00
503a6059f8
a8922f7431
skip temporarily match + throws downagrade in symfony/console, very unlikely to run
41 lines
977 B
PHP
41 lines
977 B
PHP
<?php
|
|
|
|
declare (strict_types=1);
|
|
namespace Rector\Caching;
|
|
|
|
use Rector\Caching\Contract\ValueObject\Storage\CacheStorageInterface;
|
|
final class Cache
|
|
{
|
|
/**
|
|
* @readonly
|
|
* @var \Rector\Caching\Contract\ValueObject\Storage\CacheStorageInterface
|
|
*/
|
|
private $cacheStorage;
|
|
public function __construct(CacheStorageInterface $cacheStorage)
|
|
{
|
|
$this->cacheStorage = $cacheStorage;
|
|
}
|
|
/**
|
|
* @return mixed|null
|
|
*/
|
|
public function load(string $key, string $variableKey)
|
|
{
|
|
return $this->cacheStorage->load($key, $variableKey);
|
|
}
|
|
/**
|
|
* @param mixed $data
|
|
*/
|
|
public function save(string $key, string $variableKey, $data) : void
|
|
{
|
|
$this->cacheStorage->save($key, $variableKey, $data);
|
|
}
|
|
public function clear() : void
|
|
{
|
|
$this->cacheStorage->clear();
|
|
}
|
|
public function clean(string $cacheKey) : void
|
|
{
|
|
$this->cacheStorage->clean($cacheKey);
|
|
}
|
|
}
|