重载清除缓存
@param string $cachename
@return boolean
771775
protected function removeCache($cachename){
        $file = $this->cachedir . $cachename . '.cache';
        if ( is_file($file) ) {
            @unlink($file);
        }
        return true;
    }
1043876
protected void removeFromCache(String cacheName, String key) {
        try {
            ICache cache = getCache(cacheName);
            if (cache != null) {
                cache.delete(key);
            }
        } catch (CacheException e) {
            LOGGER.warn(e.getMessage(), e);
        }
    }
608255
public function clear($name = null)
    {
        $cache = $this->_getSchemaCache();
        $tables = $cache->clear($name);

        foreach ($tables as $table) {
            $this->verbose(sprintf('Cleared "%s"', $table));
        }

        $this->out('<success>Cache clear complete</success>');

        return true;
    }
554843
public static function SaveCache($CacheName) {
      if ($CacheName != 'locale') return;
      
      if (!array_key_exists($CacheName,self::$Caches)) 
         return FALSE;
      
      $UseCache = (Gdn::Cache()->Type() == Gdn_Cache::CACHE_TYPE_MEMORY && Gdn::Cache()->ActiveEnabled());
      if ($UseCache) {
         $CacheKey = sprintf(Gdn_LibraryMap::CACHE_CACHE_NAME_FORMAT, $CacheName);
         $Stored = Gdn::Cache()->Store($CacheKey, self::$Caches[$CacheName]['cache']);
      } else {
         $FileName = self::$Caches[$CacheName]['ondisk'];
         $CacheContents = "";
         foreach (self::$Caches[$CacheName]['cache'] as $SectionTitle => $SectionData) {
            $CacheContents .= "[{$SectionTitle}]\n";
            foreach ($SectionData as $StoreKey => $StoreValue) {
               $CacheContents .= "{$StoreKey} = \"{$StoreValue}\"\n";
            }
         }
         try {
            Gdn_FileSystem::SaveFile(PATH_CACHE.DS.$FileName, $CacheContents, LOCK_EX);
         }
         catch (Exception $e) {}
      }
   }
776295
public function cleanStaticCache($sCacheName = null)
    {
        if ($sCacheName) {
            unset($this->_aStaticCache[$sCacheName]);
        } else {
            $this->_aStaticCache = null;
        }
    }
939886
public function clear(): bool
    {
        if (!empty($this->tag)) {
            // 指定标签清除
            foreach ($this->tag as $tag) {
                $this->clearTag($tag);
            }

            return true;
        }

        $this->writeTimes++;

        $files = (array) glob($this->options['path'] . ($this->options['prefix'] ? $this->options['prefix'] . DIRECTORY_SEPARATOR : '') . '*');

        foreach ($files as $path) {
            if (is_dir($path)) {
                $matches = glob($path . DIRECTORY_SEPARATOR . '*.php');
                if (is_array($matches)) {
                    array_map('unlink', $matches);
                }
                rmdir($path);
            } else {
                unlink($path);
            }
        }

        return true;
    }
1141166
public void clearCache(String cacheName) {
        Cache cache = this.cacheManager.getCache(cacheName);
        if (null != cache && Status.STATUS_ALIVE.equals(cache.getStatus())) {
            cache.removeAll();
            logger.warn("finished removeAll for cache: " + cacheName);
        }
    }
1126251
public static function clearStatCache($filename = null) {
    if (!empty($filename)) {
      unset(self::$stat_cache[self::getHashValue($filename)]);
    } else {
      self::$stat_cache = [];
    }
  }
555361
public static function delete($filename)
    {
        if (is_string($filename) && file_exists($filename)) {
            unlink($filename);
            return true;
        }

        return false;
    }
12281
public function clear()
    {
        $list = glob($this->cacheDir . '/*.*');
        if (empty($list)) return true;
        $all_deleted = true;
        foreach ($list as $path) {
            $deleted = unlink($path);
            if (!$deleted) {
                $all_deleted = false;
            }
        }
        return $all_deleted;
    }
196340
public function clear()
	{
		// Path to cache folder
		$cacheDir = PATH_APP . DS . 'cache' . DS . '*';

		// Remove recursively
		foreach (glob($cacheDir) as $cacheFileOrDir)
		{
			$readable = str_replace(PATH_APP . DS, '', $cacheFileOrDir);
			if (is_dir($cacheFileOrDir))
			{
				if (!Filesystem::deleteDirectory($cacheFileOrDir))
				{
					$this->output->addLine('Unable to delete cache directory: ' . $readable, 'error');
				}
				else
				{
					$this->output->addLine($readable . ' deleted', 'success');
				}
			}
			else
			{
				// Don't delete index.html
				if ($cacheFileOrDir != PATH_APP . DS . 'cache' . DS . 'index.html')
				{
					if (!Filesystem::delete($cacheFileOrDir))
					{
						$this->output->addLine('Unable to delete cache file: ' . $readable, 'error');
					}
					else
					{
						$this->output->addLine($readable . ' deleted', 'success');
					}
				}
			}
		}

		$this->output->addLine('Clear cache complete', 'success');
	}
762543
public function isExist($cacheName, $cacheDir = false)
    {
        $cacheDir = $cacheDir == false ? self::$cacheDir : $cacheDir;
        $dir = $cacheDir."/".$cacheName;

        return file_exists($dir);
    }
1199891
public function delete($name){

		try{

			$name = $this->_cleanName($name);
		}
		catch(CacheException $e){

			return false;
		}

		return $this->_Cache->delete("{$this->_store}:$name");
	}
345090
public function check($cacheFile, $cacheTime)
    {
        // 缓存文件不存在, 直接返回false
        if (!file_exists($cacheFile)) {
            return false;
        }

        if (0 != $cacheTime && time() > filemtime($cacheFile) + $cacheTime) {
            // 缓存是否在有效期
            return false;
        }

        return true;
    }
913826
public function clear(CacheKey $key) {
		if (isset ( $this->elements [$key->getModule()] [$key->getProperty()] )) {
			unset ( $this->elements [$key->getModule()] [$key->getProperty()] );
			$this->changed = true;
		}
	}
1105098
public function clearTable(string $tableName): bool
    {
        $delete = new DeleteQuery($this->db);

        return $delete->from($tableName)->execute();
    }
744579
public static function clearCache()
    {
        $cacheDir = Yii::getAlias('@webroot/' . static::$cacheAlias);
        FileHelper::removeDirectory($cacheDir);
        return @\mkdir($cacheDir, self::MKDIR_MODE, true);
    }