HTTP's Best-Kept Secret: Caching

Did you know that nearly one-third of the HTTP specification, RFC 2616, is dedicated to caching? Or that the Cache constraint is so fundamental to the REST architectural style that it’s fully defined before “Resources”, “Hypertext”, or “The Uniform Interface” are even mentioned? This talk will show how you can start taking advantage of HTTP’s best-kept secret: caching.

We’ll start by tearing down all of the worst practices that have accumulated over the years and caused caching in HTTP to be perceived as a form of Voodoo. Once deprogrammed, you’ll learn how HTTP’s basic caching mechanisms really work, see how to take advantage of them in Rails, and learn about advanced techniques like “efficient validation”. From there, we’ll talk a bit about the different types of caches (client, shared, gateway) as well as specific cache implementations, like Varnish, Squid, and Rack::Cache. Finally, we’ll show how to think about cacheability as a fundamental aspect of resource design and why it’s beneficial to do so.

Ryan Tomayko

GitHub

Ryan Tomayko has been writing about web architecture since 2003 and contributed to Rails core as early as 2005. He created Rack::Cache, is one of the core Sinatra hackers, and is a member of the Rack core team. Ryan works at Heroku in San Francisco helping to build the greatest web platform ever.

Comments

Ryan Tomayko

05/11/2009 6:43am PDT

Huge thanks to everyone that attended. I agree that I under delivered a bit and wish I had focused on more advanced stuff. Luckily, the questions at the end were excellent and let us dig in a bit more deeply.

05/09/2009 10:03pm PDT

Ryan knows http caching inside and out. Really great talk.

Norman Clarke

05/08/2009 3:27pm PDT

Good clear talk. I agree with the others that it might have been good to go more quickly through the intro, though I know this is often a really tough call for the presenter. The last part of the talk and the Q&A that followed were excellent.

Rob Biedenharn

05/07/2009 2:14pm PDT

A bit too much on the remedial of HTTP and the caching description could have been covered faster. The bits that described the behavior of request/response headers and the interaction of the gateway cache was quite useful.

Steve Newell

05/07/2009 10:23am PDT

Good job. A little heavy on history. Would have appreciated more “best practices” stuff.

Aaron Longwell

05/07/2009 9:58am PDT

Very useful. This stuff should be a 101-level course in our industry… but very few people are aware of it.