HTTP Cache Semantics Policy

JSON →
library 4.2.0 ·javascript
verified May 27, 2026

This library provides a robust implementation of HTTP caching logic as defined by RFC 7234/9111 (for user agents and shared caches) and RFC 5861 (for `stale-if-error` and `stale-while-revalidate`). It allows developers to determine the cacheability of HTTP responses and whether a stored response can satisfy a new request, taking into account complex factors like the `Vary` header, proxy revalidation, and authenticated responses. The current stable version is 4.2.0. The library helps in building correct HTTP caches and proxies by abstracting away the intricacies of cache control directives, providing methods like `storable()` to check if a response can be cached, and `satisfiesWithoutRevalidation()` to validate if a cached entry is suitable for a subsequent request. It offers fine-grained control via constructor options like `shared`, `cacheHeuristic`, and `immutableMinTimeToLive`.

total hits 17
actors 7 distinct systems
last hit 17h ago human
MetaBot
4
GPTBot
2
Script
1
Search engines
2
Humans
3

top countries 🇺🇸 United States · 🇨🇦 Canada · 🇩🇪 Germany · 🇮🇳 India · 🇰🇷 South Korea