public function save($content, $lock = LOCK_EX) { $this->_open("w+"); $lock = new Lock($this); switch (LOCK_SH) { case LOCK_NB: $lock->nb(); break; case LOCK_EX: $lock->ex(); break; default: $lock->ex(); } if (!$this->_fileModeInfo($this->fileName)) { throw new Exception("Cache File " . realpath($this->fileName) . " Can't write'"); } $result = fwrite($this->handle, $content); $lock->unlock(); $this->_close(); return $result; }