Wipes clean the entire cache's keys.

@return bool True on success and false on failure.
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;
    }
638565
public function purge() {
        if ($this->isready) {
            $files = glob($this->glob_keys_pattern(), GLOB_MARK | GLOB_NOSORT);
            if (is_array($files)) {
                foreach ($files as $filename) {
                    @unlink($filename);
                }
            }
            $this->keys = array();
        }
        return true;
    }
802887
public function flush()
    {
        $keys = $this->getCacheKeys();
        foreach ($keys as $key) {
            Cache::forget($this->makeCacheKey($key));
        }
        $this->removeKeys($keys);
    }
984211
public function clear()
    {
        $result = false;
        if (false !== $files = @scandir($this->cachedir)) {
            foreach ($files as $file) {
                $file = $this->cachedir.DIRECTORY_SEPARATOR.$file;
                if (false === is_dir($file)) {
                    if (false === @unlink($file)) {
                        $this->log('warning', sprintf('Enable to remove cache file `%s`.', $file));
                    } else {
                        $result = true;
                    }
                }
            }
        }

        if (true === $result) {
            $this->log('debug', sprintf('File system cache cleared in `%s`.', $this->cachedir));
        }

        return $result;
    }
325980
public function flush()
    {
        // this may take a while, but they shouldn't be flushing in production
        $cache_keys = $this->redis->keys(/* prefixed with cache: */ '*');

        foreach ($cache_keys as $key) {
            $this->redis->del($key);
        }

        unset($cache_keys);

        return true;
    }
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');
	}
677162
public function clear()
    {
        if (empty($this->tags)) {
            return false;
        }

        return $this->cacheFrontend->clean(\Zend_Cache::CLEANING_MODE_MATCHING_TAG, $this->tags);
    }
1241148
public function purge()
    {
        if (file_exists($this->directory)) {
            $files          = $this->getCachedFiles();
            $successDeleted = true;
            foreach ($files as $file) {
                $successDeleted &= $this->removeCacheFile($file);
            }

            return (bool)$successDeleted;
        }

        return false;
    }
869052
public function flush()
    {
        if (file_exists($this->CacheFolder . "/" . $this->CacheIndex)) {
            unlink($this->CacheFolder . "/" . $this->CacheIndex);
            touch($this->CacheFolder . "/" . $this->CacheIndex);
        }
        if (file_exists($this->CacheFolder . "/" . $this->CacheDB)) {
            unlink($this->CacheFolder . "/" . $this->CacheDB);
            touch($this->CacheFolder . "/" . $this->CacheDB);
        }
    }
264074
public function erase(){
    	if($this->exists())
		{
			$query = new Query(static::table());
			$query->delete()->where($this->getIdentifyCondition());
			if($query->execute())
                $this->clear();
            return $query->success();
		}
        return false;
    }
705137
public function purge() {
        if ($this->isready) {
            // Only use delete multi if we have the correct extension installed and if the memcached
            // server is shared (flushing the cache is quicker otherwise).
            $candeletemulti = ($this->candeletemulti && $this->isshared);

            if ($this->clustered) {
                foreach ($this->setconnections as $connection) {
                    if ($candeletemulti) {
                        $keys = self::get_prefixed_keys($connection, $this->prefix);
                        $connection->deleteMulti($keys);
                    } else {
                        // Oh damn, this isn't multi-site safe.
                        $connection->flush();
                    }
                }
            } else if ($candeletemulti) {
                $keys = self::get_prefixed_keys($this->connection, $this->prefix);
                $this->connection->deleteMulti($keys);
            } else {
                // Oh damn, this isn't multi-site safe.
                $this->connection->flush();
            }
        }
        // It never fails. Ever.
        return true;
    }
809047
public function purge(array $keys=null)
    {
        $this->bootOnce();

        if ($keys === null) {
            $this->clear();
            $this->_originalAttributes = [];
            $this->deleteFromDB();
            return true;
        }

        if (!$keys) {
            return false;
        }

        $this->deleteFromDB($keys);
        $this->deleteFromArrays($keys);

        return true;
    }
919493
public function reset(){
    	$originalSettings = $this->settings;
    	$this->settings = array();
    	if(file_put_contents($this->cacheFileName, "{}") === FALSE){
    		$this->settings = $originalSettings;
    		return FALSE;
    	}
    	return TRUE;
    }
520159
public function flush()
    {
        $count = xcache_count(XC_TYPE_PHP);
        for ($i = 0; $i < $count; $i++) {
            // XCache PHP cache temizle.
            xcache_clear_cache(XC_TYPE_PHP, $i);
        }

        $count = xcache_count(XC_TYPE_VAR);
        for ($i = 0; $i < $count; $i++) {
            // XCache degisken cache temizle.
            xcache_clear_cache(XC_TYPE_VAR, $i);
        }

        return true;
    }
999047
public function clear()
    {
        $result = true;
        $dir = new \DirectoryIterator($this->path);
        foreach ($dir as $file) {
            $extension = pathinfo($file->getFilename(), PATHINFO_EXTENSION);
            if (!$file->isDot() && $extension === 'ser') {
                if (!@unlink($this->path.'/'.$file->getFilename())) {
                    $result = false;
                }
            }
        }

        return $result;
    }
1134761
public function clear() {
        $loops = $this->getLoops();

        if($loops->getService("cache")->flushAll()) {
            $loops->getService("logger")->info("Clearing cache was successful.");
            return 0;
        }
        else {
            $loops->getService("logger")->err("Clearing cache failed.");
            return 1;
        }
    }
1114091
public function flush()
    {
        $this->initializeOnDemand();

        if ($this->cacheMapper->flush()) {
            // Reset the current state as well
            $this->cache = array();
            return true;
        } else {
            return false;
        }
    }