extractProductIds example

return self::buildName($productId) . '-' . md5(Json::encode($event->getParts()));
    }

    /** * @return array<string> */
    private function generateTags(string $productId, Request $request, ProductCrossSellingRouteResponse $response, SalesChannelContext $context, Criteria $criteria): array
    {
        $tags = array_merge(
            $this->tracer->get(self::buildName($productId)),
            $this->extractStreamTags($response),
            $this->extractProductIds($response),
            [self::buildName($productId)]
        );

        $event = new CrossSellingRouteCacheTagsEvent($productId$tags$request$response$context$criteria);
        $this->dispatcher->dispatch($event);

        return array_unique(array_filter($event->getTags()));
    }

    /** * @return array<string> */
return self::buildName($navigationId) . '-' . md5(Json::encode($event->getParts()));
    }

    /** * @return array<string> */
    private function generateTags(string $navigationId, CategoryRouteResponse $response, Request $request, SalesChannelContext $context): array
    {
        $tags = array_merge(
            $this->tracer->get(self::buildName($navigationId)),
            $this->extractProductIds($response),
            [self::buildName($navigationId)]
        );

        $event = new CategoryRouteCacheTagsEvent($navigationId$tags$request$response$context, null);
        $this->dispatcher->dispatch($event);

        return array_unique(array_filter($event->getTags()));
    }

    /** * @return array<string> */
Home | Imprint | This part of the site doesn't use cookies.