summaryrefslogtreecommitdiff
path: root/lib/gitlab/repository_cache.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/repository_cache.rb')
-rw-r--r--lib/gitlab/repository_cache.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/gitlab/repository_cache.rb b/lib/gitlab/repository_cache.rb
index a03ce07b6a1..56007574b1b 100644
--- a/lib/gitlab/repository_cache.rb
+++ b/lib/gitlab/repository_cache.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Interface to the Redis-backed cache store
module Gitlab
class RepositoryCache
@@ -6,7 +8,7 @@ module Gitlab
def initialize(repository, extra_namespace: nil, backend: Rails.cache)
@repository = repository
@namespace = "#{repository.full_path}:#{repository.project.id}"
- @namespace += ":#{extra_namespace}" if extra_namespace
+ @namespace = "#{@namespace}:#{extra_namespace}" if extra_namespace
@backend = backend
end