Skip to main content

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")
OptionDescription
api_keySent as X-Flush-Cache-Key header with every request
pathPath appended to each site's mainDomain to build the flush URL
methodHTTP 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:

HeaderValue
X-Flush-Cache-KeyConfigured api_key
X-Flush-Cache-Typedocument | dataObject | asset | translation
X-Flush-Cache-IdID of the updated element
X-Flush-Cache-SubTypeSubtype of the updated element

Logging: Exceptions are logged in the Application Logger ("headless" component), see backend logging