> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wpbevel.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Page cache

> A disk cache that serves pages before WordPress loads, purges itself on every change, and preloads the site in the background.

The page cache stores each page's finished HTML on disk and serves it to the next anonymous visitor **before WordPress loads**: no database, no plugins, no theme. It is off by default and lives under **Bevel → Site Settings → Tools → Optimization**, with the other performance settings.

## Switching it on

* **HTML Disk Cache**. Installs a small `advanced-cache.php` drop-in and adds `define('WP_CACHE', true)` to `wp-config.php`, on a line marked as the Kit's. The description under the switch reports what the cache is doing.
* **GZIP Compression**. Adds a marked block to `.htaccess` so cached files are served compressed; the description says whether the rules landed, and they are re-applied if the block disappears.

The Kit never touches what belongs to another plugin: a foreign `advanced-cache.php` is left alone, a `WP_CACHE` line the Kit did not write is not edited, and the switch refuses to turn on while another cache plugin is active. Switching off, or deactivating the plugin, removes the drop-in, the `WP_CACHE` line, the `.htaccess` block and the cache directory.

Files live under `wp-content/cache/bevel-page/`. A page is kept for an hour.

## What is never cached

Logged-in users, wp-admin, any request other than a plain GET, AJAX, cron and REST calls, previews, feeds, sitemaps, search results, password-protected posts, anyone who has commented, pages that set `DONOTCACHEPAGE`, and on a shop the cart, checkout, account pages and any page viewed with items in the cart. Only responses that succeeded, set no cookie and did not mark themselves private are stored.

Query strings make a page uncacheable, except the tracking parameters (`utm_*`, `fbclid`, `gclid`, `ref`, `_ga`), which are ignored so campaign links still hit the cache.

## Purging

Every content change purges the cache: saving or deleting a post, an Elementor save, a term, a comment, a menu, a widget, a theme or plugin change, a permalink change, an option update. One full purge per request, however many changes it holds. [Bevel MCP](/mcp/overview) purges after every tool that changes content.

**Clear Cache** in the admin bar's **Bevel** node clears this cache, Elementor's generated CSS, its local Google font copies and any host cache it recognises (SiteGround, W3 Total Cache, WP Super Cache, WP Fastest Cache, WP Rocket).

## Preloading

After the cache is switched on or purged, the site is crawled in the background, five pages at a time, from the public content and the XML sitemap, so the first visitor after a change still gets a cached page. The preload never runs inside the request that triggered it.
