- POST /api/purge/:customer - purge cache for specific customer
- POST /api/purge-all - purge all cache globally
- Cache keys now include version from KV, incrementing version invalidates all cached entries
- No need for Cloudflare Dashboard access to purge
response variable was scoped inside if(!bypassCache) block but referenced
outside. Changed to const response in the R2 fetch section and conditionally
cache based on bypassCache flag.
- Add ?nocache query param and Cache-Control: no-cache support to bypass Worker cache
- Shorten HTML cache TTL from 1h to 5min for faster iteration during development
- Add /api/purge/:customer endpoint (documentation)
Astro and other SSG frameworks generate /path/index.html instead of /path.html.
Added fallback logic so /products resolves to /products/index.html when
/products.html doesn't exist in R2.