1 | <?php |
||
7 | class CacheConfiguration |
||
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 | 17 | private function __construct() |
|
21 | |||
22 | /** |
||
23 | * @return KeyStrategyInterface |
||
24 | */ |
||
25 | 1 | public function getStrategy() |
|
29 | |||
30 | /** |
||
31 | * @param array $data |
||
32 | * |
||
33 | * @return static |
||
34 | */ |
||
35 | 1 | public static function create(array $data) |
|
51 | |||
52 | /** |
||
53 | * Constructor for disabled cache entities configuration |
||
54 | * |
||
55 | * @return static |
||
56 | */ |
||
57 | 16 | public static function disabled() |
|
64 | |||
65 | /** |
||
66 | * @return int|null |
||
67 | */ |
||
68 | 1 | public function getTtl() |
|
72 | |||
73 | /** |
||
74 | * @return boolean |
||
75 | */ |
||
76 | 17 | public function isEnabled() |
|
80 | |||
81 | 1 | public function extra($key) |
|
93 | |||
94 | 1 | private static function configureResolver(OptionsResolver $resolver) |
|
105 | } |
||
106 |