clearRewriteCache example

case 'doctrine-proxy':
            case 'doctrine-file':
                $tags[] = CacheManager::ITEM_TAG_MODELS;
                $this->cacheManager->clearProxyCache();
                break;
            case 'search':
                $tags[] = CacheManager::ITEM_TAG_SEARCH;
                $this->cacheManager->clearSearchCache();
                break;
            case 'rewrite':
            case 'router':
                $this->cacheManager->clearRewriteCache();
                break;
            case 'opcache':
                $this->cacheManager->clearOpCache();
                break;
            default:
                throw new NotFoundException(sprintf('Cache "%s" is not a valid cache id.', $cache));
        }

        if (!empty($capabilities['tags'])) {
            if (!empty($tags)) {
                $this->cache->clean(Zend_Cache::CLEANING_MODE_MATCHING_ANY_TAG, $tags);
            }

    public function clearByTag($tag)
    {
        switch ($tag) {
            case self::CACHE_TAG_CONFIG:
                $this->clearConfigCache();
                break;
            case self::CACHE_TAG_SEARCH:
                $this->clearSearchCache();
                break;
            case self::CACHE_TAG_ROUTER:
                $this->clearRewriteCache();
                break;
            case self::CACHE_TAG_TEMPLATE:
                $this->clearTemplateCache();
                break;
            case self::CACHE_TAG_THEME:
            case self::CACHE_TAG_HTTP:
                $this->clearHttpCache();
                break;
            case self::CACHE_TAG_PROXY:
                $this->clearProxyCache();
                $this->clearOpCache();
                
Home | Imprint | This part of the site doesn't use cookies.