Delete static cache, don't use except in unittests

@internal
433035
public static function _delete($cacheIds)
    {
        if (!is_array($cacheIds)) $cacheIds = array($cacheIds);

        $ret = true;
        if (!extension_loaded('apc') || PHP_SAPI == 'cli') {
            foreach ($cacheIds as $cacheId) {
                unset(self::$_cache[$cacheId]);
                $file = self::_getFileNameForCacheId($cacheId);
                if (!file_exists($file)) {
                    $ret = false;
                } else {
                    if (!unlink($file)) $ret = false;
                }
            }
            if (extension_loaded('apc')) {
                $result = Kwf_Util_Apc::callClearCacheByCli(array('clearCacheSimpleStatic' => implode(',', $cacheIds)));
                if (!$result['result']) $ret = false;
            }
        } else {
            $prefix = Kwf_Cache_Simple::$uniquePrefix.'-';
            foreach ($cacheIds as $cacheId) {
                if (!apc_delete($prefix.$cacheId)) {
                    $ret = false;
                }
            }
        }
        return $ret;
    }
1193303
public function cleanAction()
    {
        $this->putText("Cleaning cache...");

        $di = DI::getDefault();

        if ($di->has('config')) {
            $config = $di->get('config');

            if (!empty($config->application->view->cacheDir)) {
                $this->removeFilesFromDir($config->application->view->cacheDir);
            }

            $this->putSuccess("Done.");
        }
    }
412071
public static function destroy_volatile_caches() {
        global $SESSION;
        if (is_array(self::$volatilecaches) && count(self::$volatilecaches)>0) {
            foreach (self::$volatilecaches as $area) {
                $SESSION->navcache->{$area} = array();
            }
        } else {
            $SESSION->navcache = new stdClass;
        }
    }
821754
public function clearCache(){
		$path = Yii::getAlias('webroot').$this->getAssetsUrl().DIRECTORY_SEPARATOR.$this->folder.DIRECTORY_SEPARATOR.'*';

		$files = glob($path);

		foreach($files as $file){
			if(is_file($file))
				unlink($file);
		}
	}
350771
static function expireCache()
    {
        $http = eZHTTPTool::instance();

        $http->removeSessionVariable( 'CanInstantiateClassList' );
        $http->removeSessionVariable( 'ClassesCachedForUser' );

        // Expire user (role) cache
        eZUser::cleanupCache();
    }
615794
public static function _clear()
    {
        if (self::getBackend() == 'memcache') {
            if (!Kwf_Config::getValue('cacheSimpleNamespace')) {
                //increment namespace
                $mc = Kwf_Cache_Simple::getMemcache();
                if ($mc->get(Kwf_Cache_Simple::$uniquePrefix.'cache_namespace')) {
                    $mc->increment(Kwf_Cache_Simple::$uniquePrefix.'cache_namespace');
                }
            } else {
                $mc = Kwf_Cache_Simple::getMemcache();
                $mc->flush();
            }
        } else if (self::getBackend() == 'redis') {
            $prefixLength = strlen(self::getRedis()->_prefix(''));
            $it = null;
            while ($keys = self::getRedis()->scan($it, self::getRedis()->_prefix('simple:*'))) {
                foreach ($keys as $k=>$i) {
                    $keys[$k] = substr($i, $prefixLength);
                }
                self::getRedis()->delete($keys);
            }
        } else if (self::getBackend() == 'file') {
            foreach(glob('cache/simple/*') as $i) {
                unlink($i);
            }
        } else if (self::getBackend() == 'apc' || self::getBackend() == 'apcu') {
            //those are cleared using their own clear-cache type
        } else {
            if (!isset(self::$_zendCache)) self::getZendCache();
            $r = self::$_zendCache->clean(Zend_Cache::CLEANING_MODE_ALL);
        }
    }
744579
public static function clearCache()
    {
        $cacheDir = Yii::getAlias('@webroot/' . static::$cacheAlias);
        FileHelper::removeDirectory($cacheDir);
        return @\mkdir($cacheDir, self::MKDIR_MODE, true);
    }
734780
function clearCache() {
  cache_stopById.clear();
  cache_stopByName.clear();
  cache_stopByStatusId.clear();
  cache_stops.clear();
  cache_stopsByRoute.clear();
}
873829
protected void clearCaches() {
        DescriptorFactory.clearInstance();
        ObjectTypeFactory.clearInstance();
        TypeQualifierApplications.clearInstance();
        TypeQualifierAnnotation.clearInstance();
        TypeQualifierValue.clearInstance();
        // Make sure the codebases on the classpath are closed
        AnalysisContext.removeCurrentAnalysisContext();
        Global.removeAnalysisCacheForCurrentThread();
        IO.close(classPath);
    }
253771
def clear_cached(self):
        
        x = _INJECTABLE_CACHE.pop(self.name, None)
        if x:
            logger.debug(
                'injectable {!r} removed from cache'.format(self.name))
713315
public static function flushAll()
    {
        $GLOBALS["CACHE_MANAGER"]->cleanAll();
        $GLOBALS["stackCacheManager"]->cleanAll();
        $staticHtmlCache = StaticHtmlCache::getInstance();
        $staticHtmlCache->deleteAll();
        BXClearCache(true);
    }
304470
public function forgetCache()
    {
        return !is_null($this->cache) ? $this->cache->forget($this->cacheKey) : true;
    }
856842
static function clearAllContentCache( $ignoreINISettings = false )
    {
        if ( !$ignoreINISettings )
        {
            $ini = eZINI::instance();
            $viewCacheEnabled = ( $ini->variable( 'ContentSettings', 'ViewCaching' ) === 'enabled' );
            $templateCacheEnabled = ( $ini->variable( 'TemplateSettings', 'TemplateCache' ) === 'enabled' );
        }
        else
        {
            $viewCacheEnabled = true;
            $templateCacheEnabled = true;
        }

        if ( $viewCacheEnabled || $templateCacheEnabled )
        {
            // view cache and/or ordinary template block cache
            eZContentObject::expireAllCache();

            ezpEvent::getInstance()->notify( 'content/cache/all' );

            // subtree template block caches
            if ( $templateCacheEnabled )
            {
                eZSubtreeCache::cleanupAll();
            }
        }
    }
530236
def clear_caches(self):
        
        for element_name in dir(self.components):
            element = getattr(self.components, element_name)
            if hasattr(element, 'cache_val'):
                delattr(element, 'cache_val')
368433
public static function clear_static() {

        static::$enabledsearchareas = null;
        static::$allsearchareas = null;
        static::$instance = null;
        static::$searchareacategories = null;

        base_block::clear_static();
        engine::clear_users_cache();
    }
309338
synchronized private void clearCachedStructures() {
        mapsInitialized = false;
        packageMap = new HashMap();
        classSource = new HashMap();
        unqNameTable = null;
        nameSpaceChanged();
    }
861627
def flush_cache(self, properties=None):
        
        if hasattr(self, '_cache'):
            if properties is None:
                del(self._cache)
            else:
                for prop in properties:
                    if prop in self._cache:
                        del(self._cache[prop])