Use ClearConsent with page caching

2 min read Updated June 2026

ClearConsent is built to work with full-page caching (WP Rocket, LiteSpeed, Cloudflare, host-level caches, and so on). You usually don’t need to exclude anything — here’s why, and the few things to keep in mind.

Why ClearConsent is cache-safe

ClearConsent decides what to load in the visitor’s browser, after the page arrives. The same cached HTML is correct for everyone, because the consent logic and the visitor’s saved choice are applied client-side. ClearConsent doesn’t bake per-visitor data into the page, so a cached page is safe to serve to the next visitor.

No page-cache exclusions needed
You don’t have to exclude pages from caching for ClearConsent to work. The banner and the gating run in the browser on top of the cached page.

Purge after changing what’s blocked

If you tag a new script or change which services are gated, those edits live in your page HTML or settings. Purge your cache afterwards so visitors get the updated page rather than a stale copy.

The visitor’s choice is kept in their own browser, not in the cached HTML, so it persists across cached page views and survives a cache purge.

If you run object caching

Object caching (Redis, Memcached) doesn’t interfere with consent gating. After changing ClearConsent settings, a normal cache purge is enough to clear any cached settings output.

Was this article helpful?
Thanks for your feedback!