# Client API: Deployments: Cache

> The 3 Client API operations for cache.

Source: https://www.coritan.com/docs/api/reference/client/deployments/deployments-cache/

Part of [Deployments](/docs/api/reference/client/deployments/).

## Operations

| Method | Path | Summary |
| --- | --- | --- |
| GET | [`/api/v1/client/deployments/{deployment_uuid}/cache`](#op-get-api-v1-client-deployments-deployment-uuid-cache) | Get cache |
| PUT | [`/api/v1/client/deployments/{deployment_uuid}/cache`](#op-put-api-v1-client-deployments-deployment-uuid-cache) | Change cache settings |
| POST | [`/api/v1/client/deployments/{deployment_uuid}/cache/purge`](#op-post-api-v1-client-deployments-deployment-uuid-cache-purge) | Purge cache |

### Get cache {#op-get-api-v1-client-deployments-deployment-uuid-cache}

`GET /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

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `deployment_uuid` | path | string (uuid) | yes |

#### Responses

| Status | Meaning |
| --- | --- |
| `200` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |

### Change cache settings {#op-put-api-v1-client-deployments-deployment-uuid-cache}

`PUT /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

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `deployment_uuid` | path | string (uuid) | yes |

#### Request body

`application/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

| Status | Meaning |
| --- | --- |
| `200` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |

### Purge cache {#op-post-api-v1-client-deployments-deployment-uuid-cache-purge}

`POST /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

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `deployment_uuid` | path | string (uuid) | yes |

#### Responses

| Status | Meaning |
| --- | --- |
| `200` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |
