---
title: "Toggle website cache"
method: PATCH
path: "/api/hosting/v1/accounts/{username}/websites/{domain}/cache/toggle"
tags: ["Hosting: Cache"]
---

# Toggle website cache

`PATCH /api/hosting/v1/accounts/{username}/websites/{domain}/cache/toggle`

Turns server-side caching for the website on or off, based on the enabled flag. Enable it for
faster page loads, reduced server load, and improved user experience; recommended for production
websites. Disabling may impact performance; to temporarily bypass caching while developing or
debugging, prefer toggling cacheless mode instead.

Does nothing if caching is already in the requested state.

## Path parameters

- `username` string, required
- `domain` string, required

## Request body

- HostingV1CacheToggleCacheRequest
  - `enabled` boolean, required — Turn server-side caching on (true) or off (false) for the website.

## Response `200`

Success empty response

- CommonSuccessEmptyResource
  - `message` string

## Other responses

- `401` — Unauthenticated response
- `422` — Validation error response
- `500` — Error response

## Changes

> 88 revisions in range; 77 could not be searched.

- **2026-06-09** `d05574986eb1` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/hostinger/apis/hostinger-api/changes/api/hosting/v1/accounts/:username/websites/:domain/cache/toggle/patch.md)

---

[API](https://skmtc.dev/hostinger/apis/hostinger-api.md) · [All operations](https://skmtc.dev/hostinger/apis/hostinger-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/hostinger/hostinger-api/revisions/53ccee45e5eb/schema)
