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:
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