| Total Complexity | 9 |
| Total Lines | 46 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 13 | final class CacheManager |
||
| 14 | { |
||
| 15 | public function clearCache(): void |
||
| 16 | { |
||
| 17 | $cacheFile = $this->getCacheFilePath(); |
||
| 18 | |||
| 19 | if (file_exists($cacheFile)) { |
||
| 20 | unlink($cacheFile); |
||
| 21 | } |
||
| 22 | } |
||
| 23 | |||
| 24 | public function getCacheFilePath(): string |
||
| 25 | { |
||
| 26 | $cacheDir = Config::getInstance()->getCacheDir(); |
||
| 27 | return $cacheDir . DIRECTORY_SEPARATOR . ClassNamePhpCache::FILENAME; |
||
| 28 | } |
||
| 29 | |||
| 30 | public function cacheFileExists(): bool |
||
| 31 | { |
||
| 32 | return file_exists($this->getCacheFilePath()); |
||
| 33 | } |
||
| 34 | |||
| 35 | public function getCacheFileSize(): int |
||
| 44 | } |
||
| 45 | |||
| 46 | public function getFormattedCacheFileSize(): string |
||
| 59 | } |
||
| 60 | } |
||
| 61 |