Caching
The Didomi API will automatically cache responses for requests from API keys to some high-traffic routes. Responses to end users in the Didomi Console are never cached.
When caching is enabled for a route, the API can return data from our low-latency cache instead of querying our main database. Cached data is automatically purged when the underlying data in the main database is updated.
Response headers
The API adds HTTP headers to responses to indicate whether caching is enabled for the route and whether the response comes from the cache:
X-DidomiCacheEnabled
Format: boolean
Indicates whether caching is enabled for the route.
X-DidomiCacheEnabled: true when cache is enabled for the route.
X-DidomiCacheEnabled: false when cache is disabled for the route.
X-DidomiCacheHit
Format: boolean
Indicates whether the response for the HTTP request comes from the cache.
X-DidomiCacheHit: truewhen the response comes from the cache.
X-DidomiCacheHit: false when the response does not come from the cache.
Last updated