diff --git a/lib/bulletin_model/cache.rb b/lib/bulletin_model/cache.rb index d595629..461fbf5 100644 --- a/lib/bulletin_model/cache.rb +++ b/lib/bulletin_model/cache.rb @@ -10,7 +10,8 @@ module BulletinModel AnnsCache.where(parent_id:self.id).destroy elsif self.class == Bulletin || (self.class == Page && self.module == "announcement") if self.class == Bulletin - BulletinFeedCache.where(:uid.in => BulletinFeed.where(:tag_ids.in => Array(self.tag_ids).collect{|v| v.to_s}).pluck(:uid)).destroy + tmp_tag_ids = (Array(self.tag_ids) + Array(Bulletin.find(self.id).tag_ids)).uniq + BulletinFeedCache.where(:uid.in => BulletinFeed.where(:tag_ids.in => tmp_tag_ids.collect{|v| v.to_s}).pluck(:uid)).destroy end AnnsCache.all.destroy end