about summary refs log tree commit diff
path: root/app/controllers
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2023-03-22 15:47:44 +0100
committerGitHub <noreply@github.com>2023-03-22 15:47:44 +0100
commit2626097869c9520c21aaba73c9bcfe72c0f25f28 (patch)
tree13f828fddfaddf666babcc1ddfbf54338fc1d2e6 /app/controllers
parenta7a578a05553cc3ac34f6cd3c60b43117b309763 (diff)
Fix Rails cache namespace being overriden with `v2` for cached statuses (#24202)
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/concerns/cache_concern.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/concerns/cache_concern.rb b/app/controllers/concerns/cache_concern.rb
index e606218ac..a5a9ba3e1 100644
--- a/app/controllers/concerns/cache_concern.rb
+++ b/app/controllers/concerns/cache_concern.rb
@@ -187,7 +187,7 @@ module CacheConcern
     return [] if raw.empty?
 
     cached_keys_with_value = begin
-      Rails.cache.read_multi(*raw, namespace: 'v2').transform_keys(&:id).transform_values { |r| ActiveRecordCoder.load(r) }
+      Rails.cache.read_multi(*raw).transform_keys(&:id).transform_values { |r| ActiveRecordCoder.load(r) }
     rescue ActiveRecordCoder::Error
       {} # The serialization format may have changed, let's pretend it's a cache miss.
     end
@@ -200,7 +200,7 @@ module CacheConcern
       uncached = klass.where(id: uncached_ids).with_includes.index_by(&:id)
 
       uncached.each_value do |item|
-        Rails.cache.write(item, ActiveRecordCoder.dump(item), namespace: 'v2')
+        Rails.cache.write(item, ActiveRecordCoder.dump(item))
       end
     end