2009年3月13日 星期五

page cache, sweeper

Scaling Rails - 第二章 Page Caching
Scaling Rails - 第三章 Cache Expiration
Ruby on Rails Caching Tutorial

要注意的地方:
Sweeper 不僅可以 Observes the Controller 更可以 Observes Models。!!
sweeper 可以使用任何 ActiveRecord 的 callbacks 。
還可以用 controller callbacks,更還可以細到 action level。
ex:
after_posts
before_posts_index

如果觀察物件的object 被觸發了, 但當前的action 並沒有被sweeper 監視, 則呼叫exprie 的function就不會叫了



cache my pagination pages?



Playing nice with Apache/Lighttpd
Clearing out a partial/whole cache

沒有留言: