Fix guide · nginx

nginx is answering from proxy_cache, not your app.

An nginx reverse proxy in front of your application keeps its own copy on disk. It is invisible unless you expose its status, and open-source nginx ships no purge command — so the fix is usually a setting, not a button.

Visitor's browsertheir own copyCDN edgeCloudflare, Hostinger CDN, QUIC.cloudHost / server cacheLiteSpeed, Varnish, hPanelTHIS GUIDEWordPress plugin cacheWP Rocket, W3TC, WP Super CacheYour actual fileswhat you just published
nginx answers from its own cache files before your application runs. Restarting the app does not clear them.

Not sure this is the layer? Paste your URL and the checker reads the headers for you.

Check my site

Make it visible first

nginx tracks what it did in $upstream_cache_status, whose value is one of MISS, BYPASS, EXPIRED, STALE, UPDATING, REVALIDATED or HIT. source Expose it so tools like this one can read it: source

add_header X-Cache-Status $upstream_cache_status;
HITServed from the cache. If the page is old, this is your layer.
EXPIREDThe cached entry expired, so fresh content came from the origin.
STALEStale content served because the origin was unresponsive and proxy_cache_use_stale is configured. source
UPDATINGStale content served while the entry is being updated.
REVALIDATEDnginx checked with the origin and the cached copy was still valid.
BYPASSThe cache was skipped because a proxy_cache_bypass condition matched.

The two settings that cause stale pages

Also worth knowing: with a bare time, proxy_cache_valid 10m; caches only 200, 301 and 302 responses; a response carrying Set-Cookie is not cached; and caching parameters set in the response header take priority over the directive. source

How to clear it

The proxy_cache_purge directive is part of the commercial subscription, so open-source nginx has no purge command. source What the docs do describe is where the copies live: cache data are stored in files, and “the file name in a cache is a result of applying the MD5 function to the cache key”, split into directories by levels. source So on open-source nginx people clear the cache by removing those files from the proxy_cache_path directory and reloading. That follows from the documented file naming rather than from a documented command — nginx does not endorse it as a procedure, so take care with the path you delete.

Bypassing it while you work

proxy_cache_bypass defines conditions under which the response is not taken from the cache — if one of its parameters is non-empty and not 0, nginx goes to the origin: source

proxy_cache_bypass $cookie_nocache $arg_nocache$arg_comment;

That skips reading the cache. Pair it with proxy_no_cache if you also want to stop the response being stored. source

Other fix guides

Sources

Every step above was written from these pages, read on 14 Sep 2026. Vendors move buttons; if one has moved, the source page will say where.

  1. nginx — ngx_http_upstream_module
  2. nginx — ngx_http_proxy_module
  3. NGINX — A guide to caching with NGINX