Flushes the cache

@return boolean
324528
public function flush()
    {
        $i = 0;
        $count = $this->count();

        while ($i < $count) {
            if (xcache_clear_cache(XC_TYPE_VAR, $i) === false) {
                return false;
            }

            $i++;
        }

        return true;
    }
990945
public function flush() {
    if ($this->locked) return;
    while ($this->send()) {
    }
    foreach ($this->files as $file) {
      $this->output($file->getCentral());
    }
    $this->output($this->getEOF());
    $this->locked = TRUE;
    $this->outputter->flush();
  }
796837
public function stream_flush()
    {
        switch ($this->mode) {
            case 'r+':
            case 'rb+':
            case 'w':
            case 'wb':
            case 'w+':
            case 'wb+':
            case 'a':
            case 'ab':
            case 'a+':
            case 'ab+':
                $origPos = ftell($this->fd);
                fseek($this->fd, 0, SEEK_END);
                $size = ftell($this->fd);
                fseek($this->fd, 0, SEEK_SET);
                $contents = fread($this->fd, $size);
                fseek($this->fd, $origPos, SEEK_SET);
                self::cache()->set($this->path, $contents);
                break;
        }

        return true;
    }
687007
def FlushCache(self):
    """"""
    self._cache = b''
    self._cache_start_offset = None
    self._cache_end_offset = None
    self._ResetDecompressorState()
1026182
public function actionClearAll()
    {
        $caches = $this->findCaches();
        $cachesInfo = [];

        if (empty($caches)) {
            $this->notifyNoCachesFound();
            return ExitCode::OK;
        }

        foreach ($caches as $name => $class) {
            $cachesInfo[] = [
                'name' => $name,
                'class' => $class,
                'is_flushed' => $this->canBeCleared($class) ? $this->app->get($name)->clear() : false,
            ];
        }

        $this->notifyCleared($cachesInfo);
    }
1114325
public function flush()
    {
 		global $wpdb;

 		$cachedItems = $wpdb->get_results("
 			SELECT *
 			FROM  {$wpdb->options}
 			WHERE  option_name LIKE  '_transient_%'
 		");

 		foreach ($cachedItems as $item) {
 			$cachedKey = str_replace('_transient_', '', $item->option_name);
 			delete_transient($cachedKey);
 		}
 	}
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;
    }
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;
    }
1256337
public function flush()
    {
        $this->connect();

        $statementHandle = $this->databaseHandle->prepare('DELETE FROM "' . $this->tagsTableName . '" WHERE "context"=? AND "cache"=?');
        try {
            $statementHandle->execute([$this->context(), $this->cacheIdentifier]);
        } catch (\PDOException $exception) {
        }

        $statementHandle = $this->databaseHandle->prepare('DELETE FROM "' . $this->cacheTableName . '" WHERE "context"=? AND "cache"=?');
        try {
            $statementHandle->execute([$this->context(), $this->cacheIdentifier]);
        } catch (\PDOException $exception) {
        }
    }
733687
public function clear(): bool
    {
        //TODO: check the need to call
        clearstatcache();
        
        $dh = @opendir($this->cacheDir);
        if (false === $dh) {
            return false;
        }
        
        while (false !== ($entry = readdir($dh))) {
            $file = $this->cacheDir . '/' . $entry;
            if (is_file($file) && 0 !== strpos($entry, '.')) { //exclude .htaccess
                unlink($file);
            }
        }
        
        closedir($dh);
        
        return true;
    }
129346
public function flushFacades()
    {
        if (! $this->files->exists($storagePath = storage_path('framework/cache'))) {
            return;
        }

        foreach ($this->files->files($storagePath) as $file) {
            if (preg_match('/facade-.*\.php$/', $file)) {
                $this->files->delete($file);
            }
        }
    }
1004017
public function flush()
    {
        /** @var Cache $cache */
        $cache = $this->app['phraseanet.cache-service'];
        $flushOK = $cache->flushAll() ? 'ok' : 'ko';

        return $this->app->redirectPath('admin_dashboard', ['flush_cache' => $flushOK]);
    }
618398
public function flush(){
        $content = implode('',$this->_contentArray);
        $saveToFileRes = file_put_contents($this->_filleFullName, $content);
        return $saveToFileRes;
    }
1016396
public function flush()
    {
        $flushCallback = function ($allFlushed, $cache) {
            return $allFlushed && $cache->flush();
        };
        return array_reduce($this->caches, $flushCallback, true);
    }
1337046
public function flush() {
		$pattern = $this->getCachePath() . DIRECTORY_SEPARATOR . $this->prefix . '_*';
		
		if (self::isExecAvailable()) {
			exec('rm ' . $pattern);
			return true;
		}
		
		$list = glob($pattern);
		
		if ($list === false) {
			return false;
		}
		
		if (empty($list)) {
			return true;
		}
		
		$result = true;
		
		foreach ($list as $path) {
			if (! unlink($path)) {
				$result = false;
			}
		}
		
		return $result;
	}
428974
public function flushArrays()
    {
        $this->_filesArray = null;
        $this->_imagesArray = null;
        $this->_foldersArray = null;
        $this->_filtersArray = null;
        $this->deleteHasCache(self::CACHE_KEY_FILE);
        $this->deleteHasCache(self::CACHE_KEY_IMAGE);
        $this->deleteHasCache(self::CACHE_KEY_FOLDER);
        $this->deleteHasCache(self::CACHE_KEY_FILTER);
    }
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;
    }