v1.9.0
Minor Changes
-
e7a9731: Fix 304 revalidation persistence so background revalidation with
304 Not Modifiedstores the revalidated policy instead of rebuilding from stale response headers (restores freshHITon subsequent requests).Add
UPDATINGcache status forstale-while-revalidate(aligns with Cloudflare CDN semantics;STALEis reserved forstale-if-error).Return
304 Not ModifiedfromCache.match()when conditional request headers (If-None-Match,If-Modified-Since) match a fresh cached entry.Percent-encode
x-cache-keyheader values so cache keys with control characters or non-Latin-1 Unicode are valid HTTP header field values.Strip persisted
Agefrom stored policy metadata on read for compatibility with entries written before the revalidation fix. -
2aeb468: Add middleware-friendly
resolveWithCacheandcreateCacheHandlerAPIs with phase-aware origin error handling.