1 | <?php |
||
7 | class CacheConfiguration implements CacheConfigurationInterface |
||
8 | { |
||
9 | /** @var int|null */ |
||
10 | private $ttl; |
||
11 | /** @var bool */ |
||
12 | private $enabled = false; |
||
13 | /** @var KeyStrategyInterface */ |
||
14 | private $strategy; |
||
15 | /** @var array */ |
||
16 | private $extra; |
||
17 | |||
18 | 24 | private function __construct() |
|
21 | |||
22 | /** {@inheritdoc} */ |
||
23 | 1 | public function getStrategy() |
|
27 | |||
28 | /** |
||
29 | * @param array $data |
||
30 | * |
||
31 | * @return static |
||
32 | */ |
||
33 | 1 | public static function create(array $data) |
|
49 | |||
50 | /** |
||
51 | * Constructor for disabled cache entities configuration |
||
52 | * |
||
53 | * @return static |
||
54 | */ |
||
55 | 23 | public static function disabled() |
|
62 | |||
63 | /** {@inheritdoc} */ |
||
64 | 1 | public function getTtl() |
|
68 | |||
69 | /** {@inheritdoc} */ |
||
70 | 24 | public function isEnabled() |
|
74 | |||
75 | /** {@inheritdoc} */ |
||
76 | 1 | public function extra($key) |
|
88 | |||
89 | 1 | private static function configureResolver(OptionsResolver $resolver) |
|
100 | } |
||
101 |