Skip to content

Purging the Cache

To purge the cache, go to Console → WAF → [your domain] → Cache and click Purge All Cache. The purge propagates to all edge nodes within seconds.

  1. Open Console → WAF → [your domain] → Cache.

  2. Click Purge All Cache to refresh all content after a deploy.

  3. To clear only specific files, use Purge by URL — enter one or more URLs. It is faster than purging the whole site and preserves your cache hit ratio.

You can purge the cache from your deployment pipeline:

  1. Create a domain API key with the cache:purge scope under Console → WAF → [your domain] → API Keys (the key starts with the hw_d_ prefix).

  2. Send a cache purge request with that key from your deploy script, so the cache is cleared automatically on every release.

During active development, instead of purging on every change, enable Console → WAF → [your domain] → Cache → Development Mode. All requests go directly to your origin with no caching applied.

If you find yourself purging often, review these settings first:

  • Caching mode — Standard caches only static assets (images, CSS, JS, fonts); Full makes all responses eligible for caching (Set-Cookie and no-store headers are still honoured).
  • Edge TTL — how long HEIMWALL keeps a response at the edge. 0 means automatic: 1800 seconds for static assets, 300 seconds for HTML.
  • Browser TTL — the max-age sent to the visitor’s browser. Independent from the edge TTL; keep it short so updates reach clients quickly.
  • Excluding specific paths — write a rule with the bypasscache action for the relevant path (e.g. http.request.base_uri has_prefix "/api" → BypassCache). Those paths are never cached, so there is nothing to purge.

To confirm the purge worked:

  1. Open the changed page in a private browser window, or check response headers with curl -I https://yourdomain.com/page.
  2. If content is still stale, clear the browser cache too — the client may hold the old copy until the Browser TTL expires.