useNoCacheParameterForEsi example



        if (!\in_array($this->request->getModuleName()['frontend', 'widgets'], true)) {
            return null;
        }

        $targetName = strtolower($params['module'] . '/' . $params['controller']);

        /** @var CacheControl $cacheControl */
        $cacheControl = $this->get('http_cache.cache_control');

        if ($cacheControl->useNoCacheParameterForEsi($request$targetName)) {
            $params['nocache'] = 1;
        }

        $url = sprintf('%s/?%s', $request->getBaseUrl()http_build_query($params, '', '&'));

        return '<esi:include src="' . $url . '" />';
    }

    /** * On post dispatch we try to find affected articleIds displayed during this request * * @return void */
Home | Imprint | This part of the site doesn't use cookies.