The cache-config relation¶
The cache-config interface connects the Ingress Configurator charm (requirer) to the
Content Cache charm (provider). It configures the
Content Cache charm with backend origins, healthcheck parameters, and caching rules so
that HAProxy can route traffic through Content Cache.
Databag fields¶
The Ingress Configurator charm writes the following fields to its application databag:
Field |
Type |
Required |
Description |
|---|---|---|---|
|
JSON array of strings |
Yes |
List of backend URLs (e.g. |
|
string |
No |
Hostname content-cache presents (SNI and HTTP |
|
string |
Yes |
Time after which a backend is marked unavailable following a failure (e.g. |
|
string |
Yes |
Healthcheck interval in milliseconds (e.g. |
|
string |
Yes |
URL path used for healthchecks (e.g. |
|
JSON array of integers |
Yes |
HTTP status codes that indicate a healthy backend (e.g. |
|
JSON boolean |
Yes |
Whether nginx should verify the backend TLS certificate during healthchecks. |
|
JSON array of strings |
Yes |
Cache validity rules in nginx format (e.g. |
backend_hostname is sourced from the cache-backend-hostname charm config, which is normally
left unset for HTTP backends – content-cache passes the incoming Host header through
unchanged in that case. Setting cache-backend-hostname changes the Host header the backend
receives on every request, so only set it when the backend application is aware it’s being
fronted by a cache (e.g. its own hostname allowlist or CORS configuration accepts this value).
The Content Cache charm writes the following field to its unit databag:
Field |
Type |
Description |
|---|---|---|
|
string |
URL on which Content Cache is reachable (e.g. |