summaryrefslogtreecommitdiff
path: root/lib/gitlab/testing
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-02-26 09:08:47 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-26 09:08:47 +0000
commit66d4203791a01fdedf668a78818a229ea2c07aad (patch)
tree374fc9f6c5e709cf6ab48e257e6bfe4a504d6bbb /lib/gitlab/testing
parenta496f41f60e12a0a5c31482b7594ad547e0ade42 (diff)
downloadgitlab-ce-66d4203791a01fdedf668a78818a229ea2c07aad.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/testing')
-rw-r--r--lib/gitlab/testing/clear_thread_memory_cache_middleware.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/gitlab/testing/clear_thread_memory_cache_middleware.rb b/lib/gitlab/testing/clear_thread_memory_cache_middleware.rb
new file mode 100644
index 00000000000..6f54038ae22
--- /dev/null
+++ b/lib/gitlab/testing/clear_thread_memory_cache_middleware.rb
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+module Gitlab
+ module Testing
+ class ClearThreadMemoryCacheMiddleware
+ def initialize(app)
+ @app = app
+ end
+
+ def call(env)
+ Gitlab::ThreadMemoryCache.cache_backend.clear
+
+ @app.call(env)
+ end
+ end
+ end
+end