< ActionController::Base 4 def show 5 @thing = Thing.find(params[:id]) 6 expires_in 2.hours, public: true 7 end 8 end HTTP/1.1 200 OK Cache-Control: max-age=3600, public Friday, September 27, 13
expiration caching and validation caching: http://stackoverflow.com/a/6351738/871401 •Will use the previously stored document when 302 is returned The browser knows its stuff Friday, September 27, 13
•Database queries are cached •Entire views are cached •Layers and layers of partials are cached •Decorator methods are cached •Assets are cached Friday, September 27, 13
•Database queries are cached •Entire views are cached •Layers and layers of partials are cached •Decorator methods are cached •Assets are cached •External API calls are cached Friday, September 27, 13