Flush API Cache Trigger
Enable cache flush triggers to notify your frontend API whenever content is updated in the backend. Triggering is configured in two places: the global bundle configuration and the per-site settings in the admin panel.
For a conceptual overview of how site-based host configuration works, see Site-based Host Configuration.
Global Configuration
# packages/headless.yaml
opendxp_headless:
api_flush_cache_trigger:
api_key: 'YOUR_API_KEY'
path: '/trigger-api-cache-flush'
# method: POST (optional, default "GET")
| Option | Description |
|---|---|
api_key | Sent as X-Flush-Cache-Key header with every request |
path | Path appended to each site's mainDomain to build the flush URL |
method | HTTP method used for the flush request, defaults to GET |
Per-site Configuration
Flush Frontend Cache must be enabled individually for each site via the site's Additional Settings in the admin panel. See Site-based Host Configuration for details.
Request Headers
Every flush request includes the following headers:
| Header | Value |
|---|---|
X-Flush-Cache-Key | Configured api_key |
X-Flush-Cache-Type | document | dataObject | asset | translation |
X-Flush-Cache-Id | ID of the updated element |
X-Flush-Cache-SubType | Subtype of the updated element |
Logging: Exceptions are logged in the Application Logger ("headless" component), see backend logging