From 3a1ff720d3db393902dc34e49a3caa83c03ed686 Mon Sep 17 00:00:00 2001 From: michaelKurowski Date: Wed, 3 Jul 2024 11:44:38 +0200 Subject: [PATCH 1/3] docs: added info about cdn cache busting --- docs/content/4.sdk/2.getting-started/2.middleware-module.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/content/4.sdk/2.getting-started/2.middleware-module.md b/docs/content/4.sdk/2.getting-started/2.middleware-module.md index 9179a46319..3c3a8adf9a 100644 --- a/docs/content/4.sdk/2.getting-started/2.middleware-module.md +++ b/docs/content/4.sdk/2.getting-started/2.middleware-module.md @@ -128,6 +128,7 @@ The `middlewareModule` accepts the following options: - `defaultRequestConfig` - (Optional) default request config for each request, - `httpClient` - (Optional) a custom HTTP client, - `errorHandler` - (Optional) a custom error handler for HTTP requests. +- `cdnCacheBustingId` - (Optional) a middleware version identifier that will be attached to all `GET` requests for the sake of bypassing the CDN cache stored for a different version of the middleware. Example configuration: @@ -150,6 +151,7 @@ export const sdk = initSDK({ errorHandler: ({ error, methodName, url, params, config, httpClient }) => { // Custom error handler }, + cdnCacheBustingId: // git commit hash of the monorepo where both middleware and the storefront is located }), }); ``` From edea3d1f14513a26fe247208f8101ad0db956d7d Mon Sep 17 00:00:00 2001 From: michaelKurowski Date: Wed, 3 Jul 2024 11:47:33 +0200 Subject: [PATCH 2/3] docs: grammar fix --- docs/content/4.sdk/2.getting-started/2.middleware-module.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/content/4.sdk/2.getting-started/2.middleware-module.md b/docs/content/4.sdk/2.getting-started/2.middleware-module.md index 3c3a8adf9a..a9e7bdf551 100644 --- a/docs/content/4.sdk/2.getting-started/2.middleware-module.md +++ b/docs/content/4.sdk/2.getting-started/2.middleware-module.md @@ -151,7 +151,7 @@ export const sdk = initSDK({ errorHandler: ({ error, methodName, url, params, config, httpClient }) => { // Custom error handler }, - cdnCacheBustingId: // git commit hash of the monorepo where both middleware and the storefront is located + cdnCacheBustingId: // git commit hash of the monorepo where both middleware and the storefront are located }), }); ``` From ff52c8e5632544d6b854a6cf02d28decc0e90934 Mon Sep 17 00:00:00 2001 From: michaelKurowski Date: Wed, 3 Jul 2024 12:03:07 +0200 Subject: [PATCH 3/3] docs: reference to storefronts doc --- docs/content/4.sdk/2.getting-started/2.middleware-module.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/content/4.sdk/2.getting-started/2.middleware-module.md b/docs/content/4.sdk/2.getting-started/2.middleware-module.md index a9e7bdf551..1cd9c2c902 100644 --- a/docs/content/4.sdk/2.getting-started/2.middleware-module.md +++ b/docs/content/4.sdk/2.getting-started/2.middleware-module.md @@ -128,7 +128,7 @@ The `middlewareModule` accepts the following options: - `defaultRequestConfig` - (Optional) default request config for each request, - `httpClient` - (Optional) a custom HTTP client, - `errorHandler` - (Optional) a custom error handler for HTTP requests. -- `cdnCacheBustingId` - (Optional) a middleware version identifier that will be attached to all `GET` requests for the sake of bypassing the CDN cache stored for a different version of the middleware. +- `cdnCacheBustingId` - (Optional) a middleware version identifier that will be attached to all `GET` requests for the sake of bypassing the CDN cache stored for a different version of the middleware. [See guide about caching middleware responses here.](/storefront/features/cdn/caching-api-responses) Example configuration: