Responses are cached separately for each URL and each HTTP method.
HTTP caching is defined in RFC 7234.
- fresh — state of a cached response, which hasn't expired yet. Typically, a fresh response can satisfy requests without a need to contact the server the response originated from.
- stale — state of a cached response, which is past its expiration date. Typically, stale responses can't be used to satisfy a request without checking with the server whether it's still valid.
- satisfy — cached response satisfies a request when all conditions in the request match the cached response, e.g. they have the same HTTP method and URL, the response is fresh or the request allows stale responses, request headers match headers listed in response's
Vary header, etc.
- revalidation — checking whether a cached response is fresh. This is usually done with a conditional request containing
If-None-Match and response status
- private cache — cache for a single user, e.g. in a web browser. Private caches can store personalized responses.
- public cache — cache shared between many users, e.g. in a proxy server. Such cache can send the same response to multiple users.