| 1 | <?php |
||
| 7 | class Psr6Cache extends AbstractCache |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * @var CacheItemPoolInterface |
||
| 11 | */ |
||
| 12 | private $pool; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @var string storage key |
||
| 16 | */ |
||
| 17 | protected $key; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @var int|null seconds until cache expiration |
||
| 21 | */ |
||
| 22 | protected $expire; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * Constructor. |
||
| 26 | * |
||
| 27 | * @param CacheItemPoolInterface $pool |
||
| 28 | * @param string $key storage key |
||
| 29 | * @param int|null $expire seconds until cache expiration |
||
| 30 | */ |
||
| 31 | 9 | public function __construct(CacheItemPoolInterface $pool, $key = 'flysystem', $expire = null) |
|
| 37 | |||
| 38 | /** |
||
| 39 | * {@inheritdoc} |
||
| 40 | */ |
||
| 41 | 3 | public function save() |
|
| 48 | |||
| 49 | /** |
||
| 50 | * {@inheritdoc} |
||
| 51 | */ |
||
| 52 | 6 | public function load() |
|
| 59 | } |