2007-10-19から1日間の記事一覧
yoshitetsuの日記:acts_as_cachedを使うを参考に導入してみた。 @categories = Category.get_cache(:all) do Category.find(:all, :order => 'index') end ブロックを渡すと、ブロックの戻り値をキャッシュします。 # acts_as_cached.rb # key はget_cacheの…
yoshitetsuの日記:acts_as_cachedを使うを参考に導入してみた。 @categories = Category.get_cache(:all) do Category.find(:all, :order => 'index') end ブロックを渡すと、ブロックの戻り値をキャッシュします。 # acts_as_cached.rb # key はget_cacheの…