# Flush DNS Cache
## Endpoint
`/api/cache/flush`
**Obsolete Path:** `/api/flushDnsCache`
## Method
GET
## Description
Clears the entire DNS cache from the server, forcing the DNS server to make fresh recursive queries to repopulate the cache. This is a bulk operation that removes all cached entries, unlike `cache/delete` which targets a specific domain.
## Parameters
| `token` | string | Yes | No | The session token generated by the `login` or `createToken` call. |
## Authentication
Required. A valid session token must be provided via the `token` parameter.
## Permissions
Cache: Delete
## Response Fields
| `status` | string | `"ok"` on success. |
## Conditional Logic Notes
- This is a destructive bulk operation. All cached DNS records are removed, not just a specific domain.
- Uses the same permission level (`Cache: Delete`) as the targeted `cache/delete` action. There is no separate "flush" permission.
- After flushing, the DNS server will experience temporarily increased latency as it must perform recursive resolution for all queries until the cache is repopulated.
## Edge Cases
- Flushing an already-empty cache should still return `"ok"` (idempotent).
- This operation may cause a brief spike in outbound DNS traffic as the server re-resolves previously cached domains.
- No confirmation prompt is provided by the API; the flush is immediate upon request.
- There is no partial flush capability at this endpoint. To selectively remove entries, use `cache/delete` instead.