Perform a clean operation on all caches.

@return bool Returns true if clean succeeded on all caches in the stack.
5272
public function clean()
    {
        $cleanCallback = function ($allCleaned, $cache) {
            return $allCleaned && $cache->clean();
        };
        return array_reduce($this->caches, $cleanCallback, true);
    }
359617
public static function flush()
    {
        $instance = self::getInstance();
        $glob = @glob(self::cacheDir() . $instance->_options['file_name_prefix'] . '--*');

        if (empty($glob)) {
            return false;
        }

        foreach ($glob as $v) {
            $fileName = basename($v);
            $id = $instance->_fileNameToId($fileName);
            $instance->delete($id);
        }
        return true;
    }
1106284
public function flush()
    {
        if (file_exists($this->file)) {

            // We close the dba file before deleting
            // and reopen on next use.
            $this->__destruct();

            unlink($this->file);

            clearstatcache();

            return true;
        }

        return false;
    }
741174
public function clear(): bool
    {
        $pattern = $this->path . '/' . $this->prefix . '*' . $this->extension;

        foreach (glob($pattern) as $file) {
            if (!is_dir($file)) {
                if (unlink($file) === false) {
                    return false;
                }
            }
        }

        return true;
    }
799384
public function flush()
    {
        try {
        	$this->helper->recursivelyDeleteFromDirectory($this->path);
        	return true;

        // @codeCoverageIgnoreStart
        } catch (\Exception $e) {
        }

        return false;
        // @codeCoverageIgnoreEnd
    }
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;
    }
389835
public function clearAllCaches()
    {
        if (MemcachedCache::itWorks()) {
            $this->getMemcachedCacher()->deleteAll();
            $clear_file_cache = false;
        }

        if (MemcacheCache::itWorks()) {
            $this->getMemcacheCacher()->deleteAll();
            $clear_file_cache = false;
        }

        if (FileCache::itWorks()) {
            $this->getFileCacher()->deleteAll();
        }

        if (FakeCache::itWorks()) {
            $this->getFakeCacher()->deleteAll();
        }
    }
83979
public function clean($options = array()) {
        $return= false;
        if ($cache = $this->getCacheProvider($this->getOption(xPDO::OPT_CACHE_KEY, $options), $options)) {
            $return= $cache->flush($options);
        }
        return $return;
    }
986496
public function flush()
    {
        if (!($this->cache instanceof FlushableInterface)) {
            return false;
        }

        try {
            return $this->cache->flush();
        } catch (ZendException\ExceptionInterface $ex) {
            return false;
        }
    }
892790
public function clean()
    {
        try {
            $this->conn->exec(self::CLEAN_SQL);
        } catch (\PDOException $e) {
            return false;
        }
        return true;
    }
881919
public function purge() {
        // 1. Purge the static acceleration array.
        $this->static_acceleration_purge();
        // 2. Purge the store.
        $this->store->purge();
        // 3. Optionally pruge any stacked loaders.
        if ($this->loader) {
            $this->loader->purge();
        }
        return true;
    }
196819
public function clearCache()
    {
        $result = $this->getContainer()->get('fileManager')->removeInDir($this->cachePath);

        if ($result != true) {
            throw new Exceptions\Error("Error while clearing cache");
        }

        $this->updateCacheTimestamp();

        return $result;
    }
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;
    }
626230
public function clear()
    {
        $cachePath   = $this->options['path'];
        $cachePrefix = $this->options['prefix'] ? $this->options['prefix'].DIRECTORY_SEPARATOR : '';
        $files       = (array) glob($cachePath.$cachePrefix.'*');

        foreach ($files as $file) {
            if (is_dir($file)) {
                $matches = glob($file.'/*.php');
                if (is_array($matches)) {
                    array_map('unlink', $matches);
                }
                rmdir($file);
            } else {
                $this->unlink($file);
            }
        }

        return true;
    }
489531
public static function clear() {
        try {
            self::getCache()->clear();
            self::release();
        } catch (\RuntimeException $e) {
            self::release();
            throw $e;
        } catch (\Error $e) {
            self::release();
            throw $e;
        }
    }
998632
public function invalidateCache(): bool
    {
        if ($this->cache !== null) {
            $this->cache->delete($this->cacheKey);
            $this->items = null;
        }

        return true;
    }
319052
public function useCache()
    {
        if (is_callable($this->get_cache_callback)
            && is_callable($this->set_cache_callback)
            && is_callable($this->delete_cache_callback)) {
            return true;
        }

        return false;
    }