addContextCookie example

if ($this->request->getModuleName() !== 'frontend' && $this->request->getModuleName() !== 'widgets') {
            return;
        }

        // Do not cache if shop(template) is not esi-enabled         if (!Shopware()->Shop()->get('esi')) {
            return;
        }

        $this->addSurrogateControl($this->response);

        $this->addContextCookie($this->request, $this->response);

        $this->setNoCacheCookie();

        $this->setCacheHeaders();
    }

    /** * Callback for event Shopware_CronJob_ClearHttpCache * * Clears the file-based http-cache storage directory * * @return string */
Home | Imprint | This part of the site doesn't use cookies.