1 | <?php |
||
5 | class CacheConfiguration |
||
6 | { |
||
7 | /** @var int|null */ |
||
8 | private $ttl; |
||
9 | /** @var bool */ |
||
10 | private $enabled = false; |
||
11 | /** @var KeyStrategyInterface */ |
||
12 | private $strategy; |
||
13 | |||
14 | 17 | private function __construct() |
|
17 | |||
18 | /** |
||
19 | * @return KeyStrategyInterface |
||
20 | */ |
||
21 | 1 | public function getStrategy() |
|
25 | |||
26 | /** |
||
27 | * @param array $data |
||
28 | * |
||
29 | * @return static |
||
30 | */ |
||
31 | 1 | public static function create(array $data) |
|
41 | |||
42 | /** |
||
43 | * Constructor for disabled cache entities configuration |
||
44 | * |
||
45 | * @return static |
||
46 | */ |
||
47 | 16 | public static function disabled() |
|
54 | |||
55 | /** |
||
56 | * @return int|null |
||
57 | */ |
||
58 | 1 | public function getTtl() |
|
62 | |||
63 | /** |
||
64 | * @return boolean |
||
65 | */ |
||
66 | 17 | public function isEnabled() |
|
70 | } |
||
71 |