diff --git a/packages/hydrogen/src/storefront.ts b/packages/hydrogen/src/storefront.ts index 832fd33ba0..f88768c9f4 100644 --- a/packages/hydrogen/src/storefront.ts +++ b/packages/hydrogen/src/storefront.ts @@ -177,7 +177,7 @@ type HydrogenClientProps = { }; export type CreateStorefrontClientOptions = - HydrogenClientProps & StorefrontClientProps; + HydrogenClientProps & StorefrontClientProps & { cachePurgeKey?: string }; type StorefrontQueryOptions = StorefrontCommonExtraParams & { query: string; @@ -208,6 +208,7 @@ export function createStorefrontClient( i18n, storefrontId, logErrors = true, + cachePurgeKey, ...clientOptions } = options; const H2_PREFIX_WARN = '[h2:warn:createStorefrontClient] '; @@ -310,6 +311,7 @@ export function createStorefrontClient( requestInit.method, cacheKeyHeader, requestInit.body, + cachePurgeKey ]; const [body, response] = await fetchWithServerCache(url, requestInit, {