Clear all Cache

@museDescription  Clears all cached items in document root cache directory

@return  void
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');
	}
949018
public function clear()
    {
        $this->id = null;
        $this->mapuid = null;
        $this->name = null;
        $this->filename = null;
        $this->author = null;
        $this->environment = null;
        $this->mood = null;
        $this->bronzetime = null;
        $this->silvertime = null;
        $this->goldtime = null;
        $this->authortime = null;
        $this->copperprice = null;
        $this->laprace = null;
        $this->nblaps = null;
        $this->npcheckpoints = null;
        $this->maptype = null;
        $this->mapstyle = null;
        $this->created_at = null;
        $this->updated_at = null;
        $this->alreadyInSave = false;
        $this->clearAllReferences();
        $this->resetModified();
        $this->setNew(true);
        $this->setDeleted(false);
    }
370232
public function clear()
    {
        echo $path  = $this->getFilePath();
        $files = glob($path . '*' . $this->fileExtension);

        foreach ($files as $file)
        {
            // if cache file expire, delete cache file
            if ( time() > filemtime($file) )
            {
                @unlink($file);
            }
        }
    }
437069
public function clearAll()
    {
        $path  = $this->getFilePath();
        $files = glob($path . '*' . $this->fileExtension);

        foreach ($files as $file)
        {
            @unlink($file);
        }

        static::$keys = [];
    }
550544
public function clearCache()
    {
        $this->_data = null;
        if ($this->frontCache instanceof Cache) {
            $this->frontCache->delete($this->cacheKey);
        }
        if ($this->cache instanceof Cache) {
            return $this->cache->delete($this->cacheKey);
        }
        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;
    }
939354
protected function clearCaches() {
    $config = $this->getConfiguration();
    foreach($config->getSections() as $section) {
      $sectionValues = $config->getSection($section, true);
      if (isset($sectionValues['__class'])) {
        $instance = ObjectFactory::getInstance($section);
        if ($instance instanceof Cache) {
          $instance->clearAll();
        }
        elseif ($instance instanceof View) {
          $instance->clearCache();
        }
      }
    }
  }
486494
protected function clearItemCache()
    {
        $sItemClass = $this->getItemClass();
        $sField = $this->sIdentifierField;

        $sItemClass::clearCache($this->obElement->$sField);
    }
990962
public function clear()
    {
        foreach(FileUtil::enumAll($this->savePath) as $fileName)
        {
            if(is_file($fileName))
            {
                unlink($fileName);
            }
            else if(is_dir($fileName))
            {
                rmdir($fileName);
            }
        }
    }
492331
public function clearAll()
    {
        $this->clearErrors();
        $this->clearWarnings();
        $this->clearProgWarnings();
        $this->clearDebugMessages();
        $this->clearInfos();
        
        unset(self::$session_vars["focus_element"]);
        unset(self::$session_vars["error_element"]);
        unset(self::$session_vars["active_tab"]);
    }
819671
static function clear()
    {
        if (empty(self::$_cache) || self::$_dompdf->getOptions()->getDebugKeepTemp()) {
            return;
        }

        foreach (self::$_cache as $file) {
            if (self::$_dompdf->getOptions()->getDebugPng()) {
                print "[clear unlink $file]";
            }
            unlink($file);
        }

        self::$_cache = array();
    }
899132
public function clear()
    {
        if (null !== $this->aSource) {
            $this->aSource->removeCategory($this);
        }
        $this->id = null;
        $this->source_id = null;
        $this->pageid = null;
        $this->title = null;
        $this->files = null;
        $this->subcats = null;
        $this->pages = null;
        $this->size = null;
        $this->hidden = null;
        $this->created_at = null;
        $this->updated_at = null;
        $this->tree_left = null;
        $this->tree_right = null;
        $this->tree_level = null;
        $this->alreadyInSave = false;
        $this->clearAllReferences();
        $this->resetModified();
        $this->setNew(true);
        $this->setDeleted(false);
    }
58541
public function clear()
    {
        $directory = new \RecursiveIteratorIterator(
            new \RecursiveDirectoryIterator($this->path),
            \RecursiveIteratorIterator::SELF_FIRST
        );

        $cacheIterator = new \RegexIterator($directory, '/^.+\.cache/i', \RecursiveRegexIterator::GET_MATCH);

        $isCleared = false;

        foreach ($cacheIterator as $cacheFiles) {
            foreach ($cacheFiles as $cacheFile) {
                if (false === ($isCleared = unlink($cacheFile))) {
                    return $isCleared;
                    break;
                }
            }
        }

        return $isCleared;
    }
870074
protected function _clearCacheGroup()
    {
        $cacheGroups = (array) $this->getConfig('groups');
        foreach ($cacheGroups as $group) {
            Cache::clearGroup($group, $this->getConfig('config'));
        }
    }
398121
public function purgeAll() {
		
		if ($this->useFallback) {
			if ($this->log) {
				$this->log->trace("Purging the whole file cache.");
			}
			$files = glob($this->getDirectory()."*");
			foreach ($files as $filename) {
				unlink($filename);
			}
			return;
		}
		
		apc_clear_cache('user');
	}
1030961
public function clear()
    {
        $this->id = null;
        $this->type = null;
        $this->title = null;
        $this->year = null;
        $this->publisher = null;
        $this->journal = null;
        $this->number = null;
        $this->school = null;
        $this->author = null;
        $this->edition = null;
        $this->volume = null;
        $this->address = null;
        $this->editor = null;
        $this->howpublished = null;
        $this->note = null;
        $this->booktitle = null;
        $this->pages = null;
        $this->url = null;
        $this->lastchecked = null;
        $this->managed = null;
        $this->alreadyInSave = false;
        $this->clearAllReferences();
        $this->applyDefaultValues();
        $this->resetModified();
        $this->setNew(true);
        $this->setDeleted(false);
    }
1233500
public function clear()
    {
        $this->assertOpened();
        foreach ($this->contents as $key => $value) {
            unset($this->contents[$key]);
        }
    }