# Cache

**Summary:** Endpoints for Cache

- Role: [Developers](https://www.subrite.no/developers)
- Source: https://www.subrite.no/developers/cache
- Updated: 2026-10-13
- Markdown index: https://www.subrite.no/developers/llms.txt

<a id="get-api-v1-cache-all"></a>
## Get all keys for all cache identifiers

`GET /api/v1/cache/all`

**Authentication:** Bearer token (JWT)

### Responses

#### 200

Content type: `application/json` · `object`

#### 401

Content type: `application/json` · `ErrorResponse`

unauthorized

| Name | Type | Description |
| --- | --- | --- |
| `messageCode` (Required) | `string` |   |
| `message` | `string` |   |
| `errors` (Required) | `array of FieldError` |   |
| `errors[].field` (Required when parent is present) | `string` |   |
| `errors[].fieldValue` (Required when parent is present) | `string` |   |
| `errors[].identifier` (Required when parent is present) | `string` |   |
| `errors[].identifierValue` (Required when parent is present) | `string` |   |
| `errors[].messageCode` (Required when parent is present) | `string` |   |
| `errors[].message` | `string` |   |
| `errors[].errorType` (Required when parent is present) | `string` |   |

**Example response**

`application/json`

```json
{
  "messageCode": "string",
  "message": "string",
  "errors": [
    {}
  ]
}
```

#### 403

Content type: `application/json` · `ErrorResponse`

forbiddenResource

Same fields as [Get all keys for all cache identifiers (401)](https://www.subrite.no/developers/cache?md=true#get-api-v1-cache-all).

#### 500

Content type: `application/json` · `ErrorResponse`

internalServerError

Same fields as [Get all keys for all cache identifiers (401)](https://www.subrite.no/developers/cache?md=true#get-api-v1-cache-all).

### Example request

```bash
curl https://api.subrite.no/api/v1/cache/all \
  --header 'Authorization: Bearer <token>'
```

### Example response

200 · `application/json`

```json
{}
```

<a id="get-api-v1-cache-get-key"></a>
## Get all keys for a cache identifier

`GET /api/v1/cache/get/{key}`

**Authentication:** Bearer token (JWT)

### Parameters

| Name | In | Type | Description |
| --- | --- | --- | --- |
| `key` (Required) | path | `string` |   |

### Responses

#### 200

Content type: `application/json` · `object`

#### 401

Content type: `application/json` · `ErrorResponse`

unauthorized

Same fields as [Get all keys for all cache identifiers (401)](https://www.subrite.no/developers/cache?md=true#get-api-v1-cache-all).

**Example response**

`application/json`

```json
{
  "messageCode": "string",
  "message": "string",
  "errors": [
    {}
  ]
}
```

#### 403

Content type: `application/json` · `ErrorResponse`

forbiddenResource

Same fields as [Get all keys for all cache identifiers (401)](https://www.subrite.no/developers/cache?md=true#get-api-v1-cache-all).

#### 500

Content type: `application/json` · `ErrorResponse`

internalServerError

Same fields as [Get all keys for all cache identifiers (401)](https://www.subrite.no/developers/cache?md=true#get-api-v1-cache-all).

### Example request

```bash
curl 'https://api.subrite.no/api/v1/cache/get/{key}' \
  --header 'Authorization: Bearer <token>'
```

### Example response

200 · `application/json`

```json
{}
```

<a id="get-api-v1-cache-get-key-identifier"></a>
## Get value for a cache identifier

`GET /api/v1/cache/get/{key}/{identifier}`

**Authentication:** Bearer token (JWT)

### Parameters

| Name | In | Type | Description |
| --- | --- | --- | --- |
| `key` (Required) | path | `string` |   |
| `identifier` (Required) | path | `string` |   |

### Responses

#### 200

Content type: `application/json` · `object`

#### 401

Content type: `application/json` · `ErrorResponse`

unauthorized

Same fields as [Get all keys for all cache identifiers (401)](https://www.subrite.no/developers/cache?md=true#get-api-v1-cache-all).

**Example response**

`application/json`

```json
{
  "messageCode": "string",
  "message": "string",
  "errors": [
    {}
  ]
}
```

#### 403

Content type: `application/json` · `ErrorResponse`

forbiddenResource

Same fields as [Get all keys for all cache identifiers (401)](https://www.subrite.no/developers/cache?md=true#get-api-v1-cache-all).

#### 500

Content type: `application/json` · `ErrorResponse`

internalServerError

Same fields as [Get all keys for all cache identifiers (401)](https://www.subrite.no/developers/cache?md=true#get-api-v1-cache-all).

### Example request

```bash
curl 'https://api.subrite.no/api/v1/cache/get/{key}/{identifier}' \
  --header 'Authorization: Bearer <token>'
```

### Example response

200 · `application/json`

```json
{}
```

<a id="delete-api-v1-cache-clear-pattern-pattern"></a>
## Clear cache for a pattern

`DELETE /api/v1/cache/clear/pattern/{pattern}`

**Authentication:** Bearer token (JWT)

### Parameters

| Name | In | Type | Description |
| --- | --- | --- | --- |
| `pattern` (Required) | path | `string` |   |

### Responses

#### 200

Content type: `application/json` · `array of string`

#### 401

Content type: `application/json` · `ErrorResponse`

unauthorized

Same fields as [Get all keys for all cache identifiers (401)](https://www.subrite.no/developers/cache?md=true#get-api-v1-cache-all).

**Example response**

`application/json`

```json
{
  "messageCode": "string",
  "message": "string",
  "errors": [
    {}
  ]
}
```

#### 403

Content type: `application/json` · `ErrorResponse`

forbiddenResource

Same fields as [Get all keys for all cache identifiers (401)](https://www.subrite.no/developers/cache?md=true#get-api-v1-cache-all).

#### 500

Content type: `application/json` · `ErrorResponse`

internalServerError

Same fields as [Get all keys for all cache identifiers (401)](https://www.subrite.no/developers/cache?md=true#get-api-v1-cache-all).

### Example request

```bash
curl 'https://api.subrite.no/api/v1/cache/clear/pattern/{pattern}' \
  --request DELETE \
  --header 'Authorization: Bearer <token>'
```

### Example response

200 · `application/json`

```json
[
  "string"
]
```

<a id="delete-api-v1-cache-clear-key"></a>
## Clear cache for a key

`DELETE /api/v1/cache/clear/{key}`

**Authentication:** Bearer token (JWT)

### Parameters

| Name | In | Type | Description |
| --- | --- | --- | --- |
| `key` (Required) | path | `string` |   |

### Responses

#### 200

Content type: `application/json` · `array of string`

#### 401

Content type: `application/json` · `ErrorResponse`

unauthorized

Same fields as [Get all keys for all cache identifiers (401)](https://www.subrite.no/developers/cache?md=true#get-api-v1-cache-all).

**Example response**

`application/json`

```json
{
  "messageCode": "string",
  "message": "string",
  "errors": [
    {}
  ]
}
```

#### 403

Content type: `application/json` · `ErrorResponse`

forbiddenResource

Same fields as [Get all keys for all cache identifiers (401)](https://www.subrite.no/developers/cache?md=true#get-api-v1-cache-all).

#### 500

Content type: `application/json` · `ErrorResponse`

internalServerError

Same fields as [Get all keys for all cache identifiers (401)](https://www.subrite.no/developers/cache?md=true#get-api-v1-cache-all).

### Example request

```bash
curl 'https://api.subrite.no/api/v1/cache/clear/{key}' \
  --request DELETE \
  --header 'Authorization: Bearer <token>'
```

### Example response

200 · `application/json`

```json
[
  "string"
]
```

<a id="delete-api-v1-cache-clear-key-identifier"></a>
## Clear cache for a key with identifier

`DELETE /api/v1/cache/clear/{key}/{identifier}`

**Authentication:** Bearer token (JWT)

### Parameters

| Name | In | Type | Description |
| --- | --- | --- | --- |
| `key` (Required) | path | `string` |   |
| `identifier` (Required) | path | `string` |   |

### Responses

#### 200

#### 401

Content type: `application/json` · `ErrorResponse`

unauthorized

Same fields as [Get all keys for all cache identifiers (401)](https://www.subrite.no/developers/cache?md=true#get-api-v1-cache-all).

**Example response**

`application/json`

```json
{
  "messageCode": "string",
  "message": "string",
  "errors": [
    {}
  ]
}
```

#### 403

Content type: `application/json` · `ErrorResponse`

forbiddenResource

Same fields as [Get all keys for all cache identifiers (401)](https://www.subrite.no/developers/cache?md=true#get-api-v1-cache-all).

#### 500

Content type: `application/json` · `ErrorResponse`

internalServerError

Same fields as [Get all keys for all cache identifiers (401)](https://www.subrite.no/developers/cache?md=true#get-api-v1-cache-all).

### Example request

```bash
curl 'https://api.subrite.no/api/v1/cache/clear/{key}/{identifier}' \
  --request DELETE \
  --header 'Authorization: Bearer <token>'
```
