1 | <?php |
||
10 | class Sweep |
||
11 | { |
||
12 | /** |
||
13 | * @var Cache |
||
14 | */ |
||
15 | protected $cache; |
||
16 | |||
17 | /** |
||
18 | * @param Cache $cache |
||
19 | */ |
||
20 | public function __construct(Cache $cache) |
||
24 | |||
25 | /** |
||
26 | * Remove all cache entries. |
||
27 | * |
||
28 | * @return void |
||
29 | */ |
||
30 | public function all() |
||
34 | |||
35 | /** |
||
36 | * Remove too old cache entries. |
||
37 | * |
||
38 | * @return void |
||
39 | */ |
||
40 | public function old() |
||
44 | |||
45 | /** |
||
46 | * Internal cleaning process. |
||
47 | * |
||
48 | * @param boolean $cleanAll |
||
49 | * |
||
50 | * @return void |
||
51 | */ |
||
52 | protected function process($cleanAll = true) |
||
68 | |||
69 | /** |
||
70 | * Flush the whole storage. |
||
71 | * |
||
72 | * @throws \RuntimeException If can not flush file. |
||
73 | * @return bool |
||
74 | */ |
||
75 | public function flush() |
||
91 | } |
||
92 |