HTTP Caching HTTP responses

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Insert
> Step 2: And Like the video. BONUS: You can also share it!

Remarks

Responses are cached separately for each URL and each HTTP method.

HTTP caching is defined in RFC 7234.

Glossary

  • 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-Modified-Since or If-None-Match and response status 304.
  • 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.


Got any HTTP Question?