Skip to content

Caching problems: old pages, or pages that never cache

Fix a page that shows old content after an edit, a page that is not cached, or a cached page that should not be, with cache headers and clearing the cache.

The x-wpwaterfall-cache response header tells you which caching problem you have. Read it first, then clear the cache or change the rule that caused it. How the caches work is in Edge cache and CDN.

How do I read the cache headers?

Open the page in your browser's developer tools, or run curl -I on it.

  • x-wpwaterfall-cache is HIT, MISS, BYPASS, STALE, or EXPIRED. HIT came from cache. MISS was built and stored. BYPASS was not cached. Through the edge this is the edge's answer; x-wpwaterfall-origin-cache is the server's.
  • x-wpwaterfall-cache-reason names why a page was bypassed, for example a cookie. settings_unavailable or worker_error means the edge cache had a problem of its own, so it passed the request straight to your site. The page still works, and it is simply not cached for that moment.

For many requests at once, open Logs and pick cache-perf.log: one line per request with the server's answer and the time it took.

Why does a page show old content after an edit?

Open the site, then Caching, and clear the page with Clear URL cache. Or use Clear cache for everything. If you replaced a file and kept its name, also use Clear CDN cache. Then reload with the browser cache bypassed. See Clear all caches.

Why does a page never cache?

A response that sets a cookie is never cached, so a plugin that sets one on every page stops caching for everyone. The reason header shows the cookie. If the page does not need that cookie, turn on Remove Set-Cookie headers under Tools, then clear the cache. A logged-in visitor, a cart, and a POST are never cached either.

What if a logged-in page was cached for others?

WP Waterfall does not cache a response for a logged-in visitor or a cart. If one was cached anyway, clear the cache now. Then add the path under Caching, Rules, Paths the cache skips (or to exclusions with PUT /v1/environments/{id}/cache), and turn off Remove Set-Cookie headers if it is on.

Why does each query string make a new copy?

The utm_*, fbclid, and gclid parameters are already ignored. Add other parameters under Caching, Rules, Query parameters to ignore (or to ignored_params with PUT /v1/environments/{id}/cache). The page cache times are under Change cache expiration on Server Caching and Edge cache time on Edge Caching. static_ttl is set through the API.

Saving a change runs as a job. Watch it on Jobs, then check the headers again.

Still stuck?

Email support at wpwaterfall dot com with your site name and what you tried, or send us a message.