public function writeCache()
{
if (!$this->getFileName()) {
return;
}
if (file_exists($this->getFileName())) {
unlink($this->getFileName());
}
if (0 === count($this->lines)) {
return;
}
file_put_contents($this->getFileName(), json_encode($this->lines));
}