# deleteCacheEntries

```graphql
mutation DeleteCacheEntries($projectReference: String!, $pattern: String!) {
  deleteCacheEntries(projectReference: $projectReference, pattern: $pattern) {
    ok
  }
}
```

Delete every cache entry matching a glob pattern; \* clears the project cache. Requires project.cache.write; API keys also need delete scope.

## Arguments

| Name               | Type    | Required | Description                                  |
| ------------------ | ------- | -------- | -------------------------------------------- |
| `projectReference` | String! | Yes      | Project UUID or slug.                        |
| `pattern`          | String! | Yes      | Glob pattern over keys, 1 to 512 characters. |

## Variables

```json
{
  "projectReference": "string",
  "pattern": "a"
}
```

## Responses

| Status | Description                                             |
| ------ | ------------------------------------------------------- |
| 200    | The CacheEntryBulkDeletion! in data.deleteCacheEntries. |

## Call it

```bash
curl -X POST "https://api.veryfront.com/graphql" \
  -H "Authorization: Bearer $VERYFRONT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "query": "mutation DeleteCacheEntries($projectReference: String!, $pattern: String!) {\n  deleteCacheEntries(projectReference: $projectReference, pattern: $pattern) {\n    ok\n  }\n}",
  "variables": {
    "projectReference": "string",
    "pattern": "a"
  }
}'
```

## Example response

```json
{
  "data": {
    "deleteCacheEntries": {
      "ok": false
    }
  }
}
```
