clearProxyCache example


    public function clearDirectAction()
    {
        $cache = $this->Request()->getQuery('cache');
        switch ($cache) {
            case 'Config':
                $this->cacheManager->clearHttpCache();
                $this->cacheManager->clearTemplateCache();
                $this->cacheManager->clearConfigCache();
                $this->cacheManager->clearSearchCache();
                $this->cacheManager->clearProxyCache();
                break;
            default:
                break;
        }
    }

    /** * {@inheritdoc} */
    protected function initAcl()
    {
        

    protected function clearCache($cache)
    {
        $capabilities = $this->cache->getBackend()->getCapabilities();

        if ($cache === 'all') {
            $this->cache->clean();

            $this->cacheManager->clearHttpCache();
            $this->cacheManager->clearConfigCache();
            $this->cacheManager->clearTemplateCache();
            $this->cacheManager->clearProxyCache();
            $this->cacheManager->clearSearchCache();
            $this->cacheManager->clearOpCache();

            return;
        }

        switch ($cache) {
            case 'http':
                $this->cacheManager->clearHttpCache();
                break;
            case 'config':
                
'fields' => $data['fields'],
            ],
        ];

        return $this->typeBuilder->createType($data['internalName']$data);
    }

    private function clearCacheAndSync(): void
    {
        $this->synchronizerService->sync(true);
        $this->cacheManager->clearConfigCache();
        $this->cacheManager->clearProxyCache();
    }

    private function createUrls(Type $type): void
    {
        $shops = $this->getModelManager()->getRepository(Shop::class)->getActiveShopsFixed();
        $seoIndexer = $this->get('seoindex');

        $rewriteTable = $this->get('modules')->RewriteTable();

        foreach ($shops as $shop) {
            $seoIndexer->registerShop($shop->getId());

            
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();
                break;
            default:
                return false;
        }

        return true;
    }

    /** * Format size method * * @deprecated in 5.6, will be private in 5.8 without replacement * * @param float $bytes * * @return string */
$installedPlugins[] = $eventArgs->getPlugin()->getName();
        } else {
            $index = array_search($eventArgs->getPlugin()->getName()$installedPlugins, true);

            if ($index) {
                unset($installedPlugins[$index]);
            }
        }

        $this->synchronizerService->sync($installedPlugins);
        $this->cacheManager->clearConfigCache();
        $this->cacheManager->clearProxyCache();
    }
}
Home | Imprint | This part of the site doesn't use cookies.