Commit 8665815d314724ee92934c6a5c121ad73f3e3b4a
1 parent
873bdbb5
Exists in
master
and in
29 other branches
Move improper cache expiring to a sweeper
Showing
3 changed files
with
11 additions
and
3 deletions
Show diff stats
app/controllers/box_organizer_controller.rb
| ... | ... | @@ -82,7 +82,6 @@ class BoxOrganizerController < ApplicationController |
| 82 | 82 | def save |
| 83 | 83 | @block = boxes_holder.blocks.find(params[:id]) |
| 84 | 84 | @block.update_attributes(params[:block]) |
| 85 | - expire_timeout_fragment(@block.cache_key) | |
| 86 | 85 | redirect_to :action => 'index' |
| 87 | 86 | end |
| 88 | 87 | |
| ... | ... | @@ -93,7 +92,6 @@ class BoxOrganizerController < ApplicationController |
| 93 | 92 | def remove |
| 94 | 93 | @block = Block.find(params[:id]) |
| 95 | 94 | if @block.destroy |
| 96 | - expire_timeout_fragment(@block.cache_key) | |
| 97 | 95 | redirect_to :action => 'index' |
| 98 | 96 | else |
| 99 | 97 | session[:notice] = _('Failed to remove block') | ... | ... |
config/environment.rb
| ... | ... | @@ -64,7 +64,7 @@ Rails::Initializer.run do |config| |
| 64 | 64 | makemo |
| 65 | 65 | ] |
| 66 | 66 | unless $PROGRAM_NAME =~ /rake$/ && (ignore_rake_commands.include?(ARGV.first)) |
| 67 | - config.active_record.observers = :article_sweeper, :role_assignment_sweeper, :friendship_sweeper, :category_sweeper | |
| 67 | + config.active_record.observers = :article_sweeper, :role_assignment_sweeper, :friendship_sweeper, :category_sweeper, :block_sweeper | |
| 68 | 68 | end |
| 69 | 69 | # Make Active Record use UTC-base instead of local time |
| 70 | 70 | # config.active_record.default_timezone = :utc | ... | ... |