getConfigCacheInfo example


    private function getCacheInfo($cache): array
    {
        switch ($cache) {
            case 'http':
                $cacheInfo = $this->cacheManager->getHttpCacheInfo();
                break;
            case 'config':
                $cacheInfo = $this->cacheManager->getConfigCacheInfo();
                break;
            case 'template':
                $cacheInfo = $this->cacheManager->getTemplateCacheInfo();
                break;
            case 'proxy':
                $cacheInfo = $this->cacheManager->getShopwareProxyCacheInfo();
                break;
            case 'doctrine-proxy':
                $cacheInfo = $this->cacheManager->getDoctrineProxyCacheInfo();
                break;
            case 'opcache':
                
parent::preDispatch();

        $this->cacheManager = $this->get(CacheManager::class);
    }

    /** * Cache info action */
    public function getInfoAction()
    {
        $data = [
            $this->cacheManager->getConfigCacheInfo(),
            $this->cacheManager->getHttpCacheInfo($this->Request()),
            $this->cacheManager->getTemplateCacheInfo(),
            $this->cacheManager->getThemeCacheInfo(),
            $this->cacheManager->getShopwareProxyCacheInfo(),
            $this->cacheManager->getDoctrineProxyCacheInfo(),
            $this->cacheManager->getOpCacheCacheInfo(),
        ];

        $this->View()->assign([
            'success' => true,
            'data' => $data,
            
Home | Imprint | This part of the site doesn't use cookies.