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/repository_cache.rb')
-rw-r--r--lib/repository_cache.rb21
1 files changed, 0 insertions, 21 deletions
diff --git a/lib/repository_cache.rb b/lib/repository_cache.rb
deleted file mode 100644
index fa016a170cd..00000000000
--- a/lib/repository_cache.rb
+++ /dev/null
@@ -1,21 +0,0 @@
-# Interface to the Redis-backed cache store used by the Repository model
-class RepositoryCache
- attr_reader :namespace, :backend
-
- def initialize(namespace, backend = Rails.cache)
- @namespace = namespace
- @backend = backend
- end
-
- def cache_key(type)
- "#{type}:#{namespace}"
- end
-
- def expire(key)
- backend.delete(cache_key(key))
- end
-
- def fetch(key, &block)
- backend.fetch(cache_key(key), &block)
- end
-end