From 5dd92056d11448c712ca122399d1af4b3e85e2f5 Mon Sep 17 00:00:00 2001 From: Daniela Soares Feitosa Date: Mon, 25 May 2009 12:15:29 -0300 Subject: [PATCH] ActionItem990: fixing bug: after removing friend, friends list was crashing --- app/sweepers/friendship_sweeper.rb | 2 +- app/views/profile/communities.rhtml | 2 +- vendor/plugins/timed_cached_fragment/lib/timed_cache_fragment.rb | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/sweepers/friendship_sweeper.rb b/app/sweepers/friendship_sweeper.rb index 4ccc683..8dddab2 100644 --- a/app/sweepers/friendship_sweeper.rb +++ b/app/sweepers/friendship_sweeper.rb @@ -19,7 +19,7 @@ protected def expire_cache(profile) [profile.friends_cache_key, profile.manage_friends_cache_key].each { |ck| cache_key = ck.gsub(/(.)-\d.*$/, '\1') - expire_fragment(/#{cache_key}/) + expire_timeout_fragment(/#{cache_key}/) } blocks = profile.blocks.select{|b| b.kind_of?(FriendsBlock)} diff --git a/app/views/profile/communities.rhtml b/app/views/profile/communities.rhtml index 94375fa..f522682 100644 --- a/app/views/profile/communities.rhtml +++ b/app/views/profile/communities.rhtml @@ -3,7 +3,7 @@

<%= _("%s's communities") % profile.name %>

-<% cache(profile.communities_cache_key(params)) do %> +<% cache_timeout(profile.communities_cache_key(params), 4.hour.from_now) do %>