Site cache mode
View or set the cache group or custom rules used by one site.
cache-sitesCacheAuthentication: User (some parameters admin only)2 endpointsSite cache mode
GET
/api/v2/cache-sites/{id}Authentication: User (some parameters admin only)
Set the cache group used by a site
PUT
/api/v2/cache-sites/{id}Authentication: User (some parameters admin only)
Request body application/json
| Field | Type | Required | Description |
|---|---|---|---|
| expected_updated_at | string | — | Optimistic lock (used on update) - the updated_at of the resource as the caller read it. If it differs from the stored one, 409 stale_version is returned and nothing is saved; omit to skip the check; ignored on create. |
| group_id | integer | Required | Group referenced explicitly; null = follows the default group. |
Site cache mode object
| Field | Type | Required | Description |
|---|---|---|---|
| effective_group_id | integer | — | Group actually in effect when mode=group; null = no usable group (no cache rules are pushed). |
| expected_updated_at | string | — | Optimistic lock (used on update) - the updated_at of the resource as the caller read it. If it differs from the stored one, 409 stale_version is returned and nothing is saved; omit to skip the check; ignored on create. |
| group_id | integer | — | Group referenced explicitly; null = follows the default group. |
| mode | string | — | Cache mode: group = follows a cache group; custom = site's own rules. |
| site_id | integer | — | Site ID |
| updated_at | string | — | updated_at of the site (the version of the site row, also bumped when the cache mode changes); send it back as expected_updated_at when changing the cache mode. |