Commit 6544bc0aee14e0f0c1fa8e4314e125709a15c5bc
Committed by
Antonio Terceiro
1 parent
26df4d22
Exists in
master
and in
29 other branches
ActionItem1056: fixing bug
Cache from recent documents block form environment was not expiring
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
app/sweepers/article_sweeper.rb
@@ -13,7 +13,7 @@ protected | @@ -13,7 +13,7 @@ protected | ||
13 | 13 | ||
14 | def expire_caches(article) | 14 | def expire_caches(article) |
15 | article.hierarchy.each {|a| expire_fragment(/#{a.cache_key}/) } | 15 | article.hierarchy.each {|a| expire_fragment(/#{a.cache_key}/) } |
16 | - blocks = article.profile.blocks.select{|b|[RecentDocumentsBlock, BlogArchivesBlock].any?{|c| b.kind_of?(c)}} | 16 | + blocks = (article.profile.blocks + article.profile.environment.blocks).select{|b|[RecentDocumentsBlock, BlogArchivesBlock].any?{|c| b.kind_of?(c)}} |
17 | blocks.map(&:cache_keys).each{|ck|expire_timeout_fragment(ck)} | 17 | blocks.map(&:cache_keys).each{|ck|expire_timeout_fragment(ck)} |
18 | env = article.profile.environment | 18 | env = article.profile.environment |
19 | if env.portal_community == article.profile | 19 | if env.portal_community == article.profile |