getDefaultNoCacheTags example


    public function getNoCacheTagsForRequest(Request $request$shopId)
    {
        $tags = [];
        $autoAdmin = $this->config['admin'] ?? null;

        if (!empty($autoAdmin)) {
            $tags[] = 'admin-' . $shopId;
        }

        $configuredNoCacheTags = $this->defaultRouteService->getDefaultNoCacheTags();
        $routeTags = $this->defaultRouteService->findRouteValue($request$configuredNoCacheTags);

        if (!\is_array($routeTags)) {
            return $tags;
        }

        foreach ($routeTags as $tag) {
            if ($tag === 'slt') {
                $tags[] = 'slt';
            } else {
                $tags[] = $tag . '-' . $shopId;
            }
Home | Imprint | This part of the site doesn't use cookies.