RailsCasts
RailsCasts
Ryan Bates
#23 Counter Cache Column
7 minutes Posted Apr 25, 2007 at 12:00 am.
0:00
7:18
Download MP3
Show notes
If you need to display the record count for a has_many association, you can improve performance by caching that number in a column.