1 | <?php |
||
30 | class Psr6Cacher implements CacherInterface |
||
31 | { |
||
32 | /** |
||
33 | * Cache instance for shared manipulation |
||
34 | * |
||
35 | * @var AdapterInterface |
||
36 | */ |
||
37 | private $cache; |
||
38 | |||
39 | /** |
||
40 | * Cacher options |
||
41 | * |
||
42 | * @var array |
||
43 | */ |
||
44 | private $options; |
||
45 | |||
46 | /** |
||
47 | * Cacher constructor. |
||
48 | * |
||
49 | * @param AdapterInterface $cache Cache instance for shared manipulation |
||
50 | * @param array $options Options for Cacher |
||
51 | */ |
||
52 | public function __construct(AdapterInterface $cache, array $options) |
||
61 | |||
62 | /** |
||
63 | * {@inheritdoc} |
||
64 | */ |
||
65 | public function save($value): bool |
||
77 | |||
78 | /** |
||
79 | * {@inheritdoc} |
||
80 | */ |
||
81 | public function get() |
||
88 | |||
89 | /** |
||
90 | * {@inheritdoc} |
||
91 | */ |
||
92 | public function invalidate(): bool |
||
96 | |||
97 | /** |
||
98 | * Configures Cacher options |
||
99 | * |
||
100 | * @param OptionsResolver $optionsResolver Validates options and merges them with default values |
||
101 | * |
||
102 | * @return void |
||
103 | */ |
||
104 | protected function configureOptions(OptionsResolver $optionsResolver): void |
||
115 | } |
||
116 |