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 %>
<% @communities.each do |community| %>
- <%= profile_image_link(community)%>
diff --git a/vendor/plugins/timed_cached_fragment/lib/timed_cache_fragment.rb b/vendor/plugins/timed_cached_fragment/lib/timed_cache_fragment.rb
index 1d04d1f..359cb83 100644
--- a/vendor/plugins/timed_cached_fragment/lib/timed_cache_fragment.rb
+++ b/vendor/plugins/timed_cached_fragment/lib/timed_cache_fragment.rb
@@ -16,7 +16,9 @@ module ActionController
end
#handles the expiration of timeout fragment
def expire_timeout_fragment(key)
- @@cache_timeout_values[key] = nil
+ @@cache_timeout_values.keys.select{|k| key === k}.each do |k|
+ @@cache_timeout_values[k] = nil
+ end
expire_fragment(/#{key}/)
end
#checks to see if a cache has fully expired
--
libgit2 0.21.2