aboutsummaryrefslogtreecommitdiffstats
path: root/app/sweepers/refinery/blog_sweeper.rb
diff options
context:
space:
mode:
authorAndy Gray <andy.gray@boost.co.nz>2012-07-31 08:49:45 +1200
committerUģis Ozols <ugis.ozolss@gmail.com>2012-07-31 07:46:50 +0300
commit261a3601b9de03a9622d9b0f406b310b3a804a6e (patch)
tree407dc0936c238193d577260e99a77e572b17cc9e /app/sweepers/refinery/blog_sweeper.rb
parent8385eac7508c69f96535e2a023f7754bea889bfa (diff)
downloadrefinerycms-blog-261a3601b9de03a9622d9b0f406b310b3a804a6e.tar.gz
refinerycms-blog-261a3601b9de03a9622d9b0f406b310b3a804a6e.tar.bz2
refinerycms-blog-261a3601b9de03a9622d9b0f406b310b3a804a6e.zip
Removed page caching on posts, and the associated sweeper
Diffstat (limited to 'app/sweepers/refinery/blog_sweeper.rb')
-rw-r--r--app/sweepers/refinery/blog_sweeper.rb26
1 files changed, 0 insertions, 26 deletions
diff --git a/app/sweepers/refinery/blog_sweeper.rb b/app/sweepers/refinery/blog_sweeper.rb
deleted file mode 100644
index a58ac7e..0000000
--- a/app/sweepers/refinery/blog_sweeper.rb
+++ /dev/null
@@ -1,26 +0,0 @@
-module Refinery
- class BlogSweeper < ActionController::Caching::Sweeper
- observe Blog::Post, Blog::Comment
-
- def after_create(record)
- expire_cache_for(record)
- end
-
- def after_update(record)
- expire_cache_for(record)
- end
-
- def after_destroy(record)
- expire_cache_for(record)
- end
-
- private
-
- def expire_cache_for(record)
- # TODO: Convert these to url helpers
- expire_page '/blog'
- expire_page '/blog/feed.rss'
- end
-
- end
-end