#93
Feb 17, 2008
24 comments
Action Caching
Action caching behaves much like page caching except it processes the controller filters. You can also make it conditional as seen in this episode.
Caching in Rails 2.1
Rails 2.1 brings some new caching features which makes it very easy to cache any values including models. See how in this episode.
Touch and Cache
Rails 2.3.3 brings us a new feature called "touch". See how to use this to auto-expire associated caches in this episode.
Page Caching
Page caching is an efficient way to cache stateless content. In this episode I will show you how to cache the dynamic javascript we created last week.
Fragment Caching
Sometimes you only want to cache a section of a page instead of the entire page. Fragment caching is the answer as shown in this episode.
Dynamic Page Caching
Use JavaScript to allow dynamic content in a page cache. In this episode I show you how to insert the user-specific content into a page through JavaScript.
Counter Cache Column
If you need to display the record count for a has_many association, you can improve performance by caching that number in a column.
Caching with Instance Variables
Learn a quick way to improve performance. Just store the end result of an expensive command in an instance variable!
Memoization
Rails 2.2 is out! In this episode I show how to upgrade Rails and then demonstrate one of the new additions: Memoization.
Cron in Ruby
Cron is great for handling recurring tasks, but it is an external dependency with a crazy syntax. In this episode I show you how to use Whenever to create cron jobs with Ruby.







