| Conditions | 3 |
| Paths | 3 |
| Total Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 75 | public function flush() |
||
| 76 | { |
||
| 77 | $file = $this->cache->getStorage(); |
||
| 78 | |||
| 79 | if (file_exists($file)) { |
||
| 80 | // close the dba file before delete |
||
| 81 | // and reopen on next use |
||
| 82 | $this->cache->closeDba(); |
||
| 83 | |||
| 84 | if (!@unlink($file)) { |
||
| 85 | throw new \RuntimeException("can not flush file '$file'"); |
||
| 86 | } |
||
| 87 | } |
||
| 88 | |||
| 89 | return true; |
||
| 90 | } |
||
| 91 | } |
||
| 92 |