From 283a4909b3d1dde4f5f9fd6e274b61646272b227 Mon Sep 17 00:00:00 2001 From: Michael Webb Date: Fri, 4 Aug 2023 09:02:31 +1000 Subject: [PATCH] Fix sweeper --- app/sweepers/statistics_sweeper.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/sweepers/statistics_sweeper.rb b/app/sweepers/statistics_sweeper.rb index c2d75af9..b3b77819 100644 --- a/app/sweepers/statistics_sweeper.rb +++ b/app/sweepers/statistics_sweeper.rb @@ -27,9 +27,9 @@ def clear_group_caches(associated_users) associated_groups = GroupMember.includes(:group).where(user_id: associated_users.map(&:id)).map(&:group).uniq associated_groups.each do |group| - cache.clear(group_statistics_cache_key(group)) - cache.clear(group_calibration_scores_cache_key(group)) - cache.clear(group_leaderboard_cache_key(group)) + cache.delete(group_statistics_cache_key(group)) + cache.delete(group_calibration_scores_cache_key(group)) + cache.delete(group_leaderboard_cache_key(group)) end end end