@@ 131-137 (lines=7) @@ | ||
128 | */ |
|
129 | public function clear() |
|
130 | { |
|
131 | foreach ($this->getCacheFolderIterator() as $fileInfo) { |
|
132 | if ($fileInfo->isDir()) { |
|
133 | @rmdir($fileInfo->getRealPath()); |
|
134 | } |
|
135 | ||
136 | @unlink($fileInfo->getRealPath()); |
|
137 | } |
|
138 | ||
139 | @rmdir($this->cachePath); |
|
140 | ||
@@ 164-168 (lines=5) @@ | ||
161 | private function cleanExpired() |
|
162 | { |
|
163 | $now = time(); |
|
164 | foreach ($this->getCacheFolderIterator() as $fileInfo) { |
|
165 | if (!$fileInfo->isDir() && $now > filemtime($fileInfo->getRealPath())) { |
|
166 | @unlink($fileInfo->getRealPath()); |
|
167 | } |
|
168 | } |
|
169 | } |
|
170 | ||
171 | /** |