Beispiel #1
0
 /**
  * {@inheritdoc}
  */
 public function setFromStorage($json)
 {
     list($cache, $complete, $expire) = json_decode($json, true);
     if (!$expire || $expire > $this->getTime()) {
         $this->cache = $cache;
         $this->complete = $complete;
     } else {
         $this->adapter->delete($this->file);
     }
 }
Beispiel #2
0
 /**
  * Delete a file
  *
  * @param  string                $path path to file
  * @throws FileNotFoundException
  * @return boolean               success boolean
  */
 public function delete($path)
 {
     $path = Util::normalizePath($path);
     $this->assertPresent($path);
     if ($this->adapter->delete($path) === false) {
         return false;
     }
     $this->cache->delete($path);
     return true;
 }