コード例 #1
0
 public function setFile($file, $fileContent)
 {
     $file = $this->cacheDirectory->getRelativePathTo($file);
     $hash = $this->calcHash($fileContent);
     if ($this->isDryRun && $this->cache->has($file) && $this->cache->get($file) !== $hash) {
         $this->cache->clear($file);
         return;
     }
     $this->cache->set($file, $hash);
 }
コード例 #2
0
ファイル: NamespacedCache.php プロジェクト: kuria/cache
 public function clear()
 {
     if ($this->wrappedCache->canFilter()) {
         return $this->wrappedCache->filter($this->prefix);
     } else {
         return $this->wrappedCache->clear();
     }
 }
コード例 #3
0
ファイル: CacheLog.php プロジェクト: thumbtack/querycache
 /**
  * @inheritdoc
  */
 public function clear()
 {
     $start = microtime(true);
     $this->instance->clear();
     $this->update_stats(__FUNCTION__, $start, '');
 }