Client API: Deployments: Cache
The 3 Client API operations for cache.
Part of Deployments.
Operations
Section titled Operations| Method | Path | Summary |
|---|---|---|
| GET | /api/v1/client/deployments/{deployment_uuid}/cache |
Get cache |
| PUT | /api/v1/client/deployments/{deployment_uuid}/cache |
Change cache settings |
| POST | /api/v1/client/deployments/{deployment_uuid}/cache/purge |
Purge cache |
Get cache
Section titled Get cacheGET /api/v1/client/deployments/{deployment_uuid}/cache
Whether the edge keeps copies of what the deployment marks cacheable and for how long (0 follows its own headers); null while it has no address.
Authentication: an access token, sent as Authorization: Bearer <token>.
Parameters
Section titled Parameters| Name | In | Type | Required |
|---|---|---|---|
deployment_uuid |
path | string (uuid) | yes |
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
Change cache settings
Section titled Change cache settingsPUT /api/v1/client/deployments/{deployment_uuid}/cache
Change what the body names on every address. 409 while it has no
address; 402 without cache_controls on the owner's plan.
Authentication: an access token, sent as Authorization: Bearer <token>.
Parameters
Section titled Parameters| Name | In | Type | Required |
|---|---|---|---|
deployment_uuid |
path | string (uuid) | yes |
Request body
Section titled Request bodyapplication/json (required)
| Field | Type | Required | Description |
|---|---|---|---|
cache_enabled |
boolean or null | no | Left out: kept |
cache_max_age |
integer or null | no | Seconds; 0 follows the deployment's own headers. Left out: kept |
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
Purge cache
Section titled Purge cachePOST /api/v1/client/deployments/{deployment_uuid}/cache/purge
Drop every copy the edge keeps of the deployment's answers, for each
of its addresses on every edge node; each comes from the deployment
again on its next request. 402 without cache_controls on the
owner's plan; 409 while it has no address; 30 purges per deployment an
hour, then 429. failed lists the addresses whose purge could not
be sent.
Authentication: an access token, sent as Authorization: Bearer <token>.
Parameters
Section titled Parameters| Name | In | Type | Required |
|---|---|---|---|
deployment_uuid |
path | string (uuid) | yes |
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |