summaryrefslogtreecommitdiff
path: root/lib/gitlab/repository_cache_adapter.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/repository_cache_adapter.rb')
-rw-r--r--lib/gitlab/repository_cache_adapter.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/gitlab/repository_cache_adapter.rb b/lib/gitlab/repository_cache_adapter.rb
index bd0e51cbfe5..160e3d13b43 100644
--- a/lib/gitlab/repository_cache_adapter.rb
+++ b/lib/gitlab/repository_cache_adapter.rb
@@ -136,6 +136,8 @@ module Gitlab
clear_memoization(memoizable_name(name))
end
+
+ expire_request_store_method_caches(methods)
end
private
@@ -144,6 +146,12 @@ module Gitlab
"#{name.to_s.tr('?!', '')}"
end
+ def expire_request_store_method_caches(methods)
+ methods.each do |name|
+ request_store_cache.expire(name)
+ end
+ end
+
# All cached repository methods depend on the existence of a Git repository,
# so if the repository doesn't exist, we already know not to call it.
def fallback_early?(method_name)