Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-02-26 12:08:47 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-26 12:08:47 +0300
commit66d4203791a01fdedf668a78818a229ea2c07aad (patch)
tree374fc9f6c5e709cf6ab48e257e6bfe4a504d6bbb /lib/gitlab/testing
parenta496f41f60e12a0a5c31482b7594ad547e0ade42 (diff)
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