Skip to content

Commit 3a1ff72

Browse files
docs: added info about cdn cache busting
1 parent c5068dd commit 3a1ff72

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

docs/content/4.sdk/2.getting-started/2.middleware-module.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ The `middlewareModule` accepts the following options:
128128
- `defaultRequestConfig` - (Optional) default request config for each request,
129129
- `httpClient` - (Optional) a custom HTTP client,
130130
- `errorHandler` - (Optional) a custom error handler for HTTP requests.
131+
- `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.
131132

132133
Example configuration:
133134

@@ -150,6 +151,7 @@ export const sdk = initSDK({
150151
errorHandler: ({ error, methodName, url, params, config, httpClient }) => {
151152
// Custom error handler
152153
},
154+
cdnCacheBustingId: // git commit hash of the monorepo where both middleware and the storefront is located
153155
}),
154156
});
155157
```

0 commit comments

Comments
 (0)