HTTP Cache
Why Cache
- Reduce latency
- Cut down the bandwidth
- Reduced load on the server
Type
- Browser Cache
- Proxy / Reverse Proxy Cache
Caching Headers
- caching header
- expires
- pragma
- content-control
- validator
- etag (entity tags)
- last-modified
- if-none-match
- if-modified-since
Cache-Control
| |
---|
max-age | content can be cached for given number of seconds |
s-maxage | content can be cached at public places for given number of seconds. s: share |
private | only cached in the client/browser |
public | cache in client/browser and also be cached in the proxies |
no-cache | content can be cached but must require validation |
no-store | content is not to be cached |
must-revalidate | |
proxy-revalidate | |
Reference:
;