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-03-11 21:09:23 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-11 21:09:23 +0300
commit76e9fc7b29c1ce716c26932e9fbec0f3c99f53f4 (patch)
treeb5ca8e3a6b2cf93b67257b38ee71e2efee177700 /lib/gitlab/process_memory_cache.rb
parenta210c43e0aca0311cc1d3d381763b25979ec72dc (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/process_memory_cache.rb')
-rw-r--r--lib/gitlab/process_memory_cache.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/gitlab/process_memory_cache.rb b/lib/gitlab/process_memory_cache.rb
new file mode 100644
index 00000000000..5e8578711b2
--- /dev/null
+++ b/lib/gitlab/process_memory_cache.rb
@@ -0,0 +1,13 @@
+# frozen_string_literal: true
+
+module Gitlab
+ class ProcessMemoryCache
+ # ActiveSupport::Cache::MemoryStore is thread-safe:
+ # https://github.com/rails/rails/blob/2f1fefe456932a6d7d2b155d27b5315c33f3daa1/activesupport/lib/active_support/cache/memory_store.rb#L19
+ @cache = ActiveSupport::Cache::MemoryStore.new
+
+ def self.cache_backend
+ @cache
+ end
+ end
+end