extractStreamTags 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> */
Home | Imprint | This part of the site doesn't use cookies.