HTTP Caching with Varnish

ConFoo, February 26th, 2016

© David Buchmann

What is a reverse proxy again?

What could possibly go wrong?


HTTP Refresher

HTTP is simple


GET /path
Accept-Encoding: text/html


HTTP/1.1 200 OK
Content-Type: text/html


HTTP verbs

HTTP response codes

HTTP Cache Control

Cache control headers

HTTP 1.1, RFC 2616, Sections 13.2 and 13.3

Cache Expiration

Cache-Control: s-maxage=3600, max-age=900
Expires: Thu, 15 May 2014 08:00:00 GMT
  1. s-maxage
  2. max-age
  3. Expires (HTTP 1.0 - avoid!)
  4. Default to default_ttl if nothing specified

Cache validation