aboutsummaryrefslogtreecommitdiffstats
path: root/app
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
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')
-rw-r--r--app/controllers/refinery/blog/admin/comments_controller.rb2
-rw-r--r--app/controllers/refinery/blog/admin/posts_controller.rb2
-rw-r--r--app/controllers/refinery/blog/posts_controller.rb2
-rw-r--r--app/sweepers/refinery/blog_sweeper.rb26
4 files changed, 0 insertions, 32 deletions
diff --git a/app/controllers/refinery/blog/admin/comments_controller.rb b/app/controllers/refinery/blog/admin/comments_controller.rb
index ce4ac70..dd9a351 100644
--- a/app/controllers/refinery/blog/admin/comments_controller.rb
+++ b/app/controllers/refinery/blog/admin/comments_controller.rb
@@ -3,8 +3,6 @@ module Refinery
module Admin
class CommentsController < ::Refinery::AdminController
- cache_sweeper Refinery::BlogSweeper
-
crudify :'refinery/blog/comment',
:title_attribute => :name,
:order => 'published_at DESC'
diff --git a/app/controllers/refinery/blog/admin/posts_controller.rb b/app/controllers/refinery/blog/admin/posts_controller.rb
index cbde2f8..b5d7e63 100644
--- a/app/controllers/refinery/blog/admin/posts_controller.rb
+++ b/app/controllers/refinery/blog/admin/posts_controller.rb
@@ -3,8 +3,6 @@ module Refinery
module Admin
class PostsController < ::Refinery::AdminController
- cache_sweeper Refinery::BlogSweeper
-
crudify :'refinery/blog/post',
:order => 'published_at DESC',
:include => [:translations]
diff --git a/app/controllers/refinery/blog/posts_controller.rb b/app/controllers/refinery/blog/posts_controller.rb
index a236267..b04000b 100644
--- a/app/controllers/refinery/blog/posts_controller.rb
+++ b/app/controllers/refinery/blog/posts_controller.rb
@@ -2,8 +2,6 @@ module Refinery
module Blog
class PostsController < BlogController
- caches_page :index, :unless => proc {|c| c.refinery_user_signed_in? || c.flash.any? || params[:page].present? }
-
before_filter :find_all_blog_posts, :except => [:archive]
before_filter :find_blog_post, :only => [:show, :comment, :update_nav]
before_filter :find_tags
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