Sometimes your web application can be slow. Or you have a surge of traffic. Or you want to run your site on slow hardware or a shared host. For those times you need caching.
Ruby on Rails comes with page, action, and fragment caching built-in. You can use these techniques on single pages or in combinations across the pages of your application.
This screencast show you how to use all three and points out a few troubleshooting tips along the way.
Now with a convenient chapter menu! This is a free update for anyone who purchased this screencast in the past.
Source code included. Uses the current Rails 1.2.2. Purchase includes access to Quicktime 7 and iPod-ready versions. Subscriptions are also available.
See also Part II where you’ll learn how to benchmark a full Rails stack with httperf (authored together with Zed Shaw).
| Minute Mark | Topic |
| 0 | Caching Basics |
| 2 | Theory |
| 5 | Setup |
| 21 | Page Caching |
| 28 | Sweeping |
| 52 | Strategies |
| 56 | Tips |
| 1:03 | Action Caching |
| 1:20 | Fragment Caching |
| 1:31 | Resources |
| 1:32 | Benchmarking Preview |
This is an intermediate topic and assumes that you have built at least one Rails application. A simple application is built from scratch, and caching techniques are applied to it.
Revision (Notes) · Created: Feb 21, 2007 · Length: min · 95 MB
“PeepCode is awesome!” Tim O'Reilly, O'Reilly Media
“These things are fantastic and the price is a steal. I strongly urge you to support this effort and buy the episodes. What a terrific way to learn!” Scott Barron, Rails Core Committer
“[The] git PeepCode book is awesome. Congrats on a job very well done. This should be required reading for all git users.” Jamis Buck, Rails Core Alumnus
“It was refreshing to read about git from the bottom up, and not compared to SVN. I was at the stage where I could do most of the basic tasks I used to do in SVN, but lacked a fundamental understanding of how it was working under the hood...Understanding all those concepts really helped me grok why the higher level commands and workflows work the way they do, and how to avoid some of the pitfalls.” James, in blog comment
“Even if you are not planning to write a Rails plugin, you should absolutely check this book, there are great insights about how Rails works and you will figure out that building a plugin is as easy as anything in Ruby, it’s just a matter of knowing where to place your code.” Codevader Blog
Login or signup and enter the code on your account page. If it is still valid you will be able to browse the list of products and redeem an episode.