HTTP's Best-Kept Secret: Caching

Location: Pavilion 9 - 10 Level:
Average rating: ***..
(3.65, 43 ratings)

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.

Photo of Ryan Tomayko

Ryan Tomayko


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 on this page are now closed.


Picture of Ryan Tomayko
Ryan Tomayko
05/10/2009 11:43pm 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 3:03pm PDT

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

Picture of Norman Clarke
Norman Clarke
05/08/2009 8:27am 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.

Picture of Rob Biedenharn
Rob Biedenharn
05/07/2009 7:14am 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 3:23am PDT

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

Picture of Aaron Longwell
Aaron Longwell
05/07/2009 2:58am PDT

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

News and Coverage
co-presented by Ruby Central, Inc. O'Reilly
  • Engine Yard
  • Heroku
  • Sun Microsystems
  • Blue Box Group
  • New Relic

Sponsorship Opportunities

For information on exhibition and sponsorship opportunities at RailsConf, contact Yvonne Romaine at

Download the RailsConf Sponsor/Exhibitor Prospectus

Media Partner Opportunities

Download the Media & Promotional Partner Brochure (PDF) for information on trade opportunities with O'Reilly conferences or contact mediapartners@

Program Ideas

Post your suggestions for speakers, topics, and activities on the RailsConf wiki or send an email to

Press and Media

For media-related inquiries, contact Maureen Jennings at

Contact Us

View a complete list of RailsConf 2009 contacts.