Different Kind of Caches
- Browser Caches
- Proxy Caches
- Gateway Caches (Reverse Proxy Caches)
-> image
HTTP Expiration and Validation
- Expiration = Can i take the ressource from my cache without requesting the server?
- Validation = Check on the server, if my ressource is still valid
Expires: Fri, 30 Oct 1998 14:19:41 GMT
- easy to use
- good for static ressources (long caching time)
- Date is based on server time
Cache-Control: max-age=3600, public
--> image proxy / gateway / browser cache
- max-age=[seconds] - ttl for all caches
- s-maxage=[seconds] - override max-age ttl for proxy caches (proxy/gateway)
- public - MAY be cached by any cache
- private - MUST NOT be cached by a shared cache
Cache-Control is preferred against Expires
Validation - Last-Modified
Response: Last-Modified
Request: If-Modified-Since
--
Validation - ETag
Generated by Server
Change every time, when representation does
->image