From: Tom Hughes Date: Wed, 27 Jan 2010 09:12:25 +0000 (+0000) Subject: Fix expiry of cached diary views. X-Git-Tag: live~6889^2~10 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/5d658d5a34d573d33045194fe4ee2b89f5c5c908 Fix expiry of cached diary views. --- diff --git a/app/models/diary_sweeper.rb b/app/models/diary_sweeper.rb index 0fce2c819..c003cc0f5 100644 --- a/app/models/diary_sweeper.rb +++ b/app/models/diary_sweeper.rb @@ -21,7 +21,7 @@ private when record.is_a?(DiaryComment): entry = record.diary_entry end - expire_action(:controller => 'diary_entry', :action => 'view', :id => entry.id) + expire_action(:controller => 'diary_entry', :action => 'view', :display_name => entry.user.display_name, :id => entry.id) expire_action(:controller => 'diary_entry', :action => 'list', :language => nil, :display_name => nil) expire_action(:controller => 'diary_entry', :action => 'list', :language => entry.language_code, :display_name => nil) diff --git a/app/models/user_sweeper.rb b/app/models/user_sweeper.rb index 84373be74..7f172317d 100644 --- a/app/models/user_sweeper.rb +++ b/app/models/user_sweeper.rb @@ -17,7 +17,7 @@ private old_record.visible != new_record.visible or old_record.display_name != new_record.display_name) old_record.diary_entries.each do |entry| - expire_action(:controller => 'diary_entry', :action => 'view', :id => entry.id) + expire_action(:controller => 'diary_entry', :action => 'view', :display_name => old_record.display_name, :id => entry.id) expire_action(:controller => 'diary_entry', :action => 'list', :language => entry.language_code, :display_name => nil) expire_action(:controller => 'diary_entry', :action => 'rss', :language => entry.language_code, :display_name => nil) end