Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: added info about cdn cache busting #7208

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/content/4.sdk/2.getting-started/2.middleware-module.md
Original file line number Diff line number Diff line change
Expand Up @@ -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. [See guide about caching middleware responses here.](/storefront/features/cdn/caching-api-responses)

Example configuration:

Expand All @@ -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 are located
}),
});
```
Expand Down
Loading