| 1 | <?php |
||
| 10 | class SymfonyCache implements HandlerInterface |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * @var \Symfony\Component\Cache\Adapter\AdapterInterface |
||
| 14 | */ |
||
| 15 | protected $cache; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @var int |
||
| 19 | */ |
||
| 20 | protected $timeToLive; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * SymfonyCache constructor. |
||
| 24 | * |
||
| 25 | * @param \Symfony\Component\Cache\Adapter\AdapterInterface $cache |
||
| 26 | * @param int $timeToLive |
||
| 27 | */ |
||
| 28 | public function __construct(AdapterInterface $cache, int $timeToLive = 3600) |
||
| 33 | |||
| 34 | public function has(string $cacheKey): bool |
||
| 42 | |||
| 43 | public function get(string $cacheKey): array |
||
| 51 | |||
| 52 | public function set(string $cacheKey, array $data): void |
||
| 62 | |||
| 63 | protected function computeKey(string $cacheKey): string |
||
| 67 | } |
||
| 68 |