diff options
author | Alejandro RodrÃguez <alejorro70@gmail.com> | 2018-03-07 04:25:12 +0300 |
---|---|---|
committer | Alejandro RodrÃguez <alejorro70@gmail.com> | 2018-03-08 17:54:21 +0300 |
commit | bb2bf39ddfc05db887d4a02ad3a38dbf81beed1a (patch) | |
tree | e175678908f5b0f1d0d469adb0859ecd88dd3d4e /lib/gitlab/repository_cache.rb | |
parent | 5171e2f3d4fdc681a58e11f9615afa968324a278 (diff) |
Cache `#can_be_resolved_in_ui?` git operations
Diffstat (limited to 'lib/gitlab/repository_cache.rb')
-rw-r--r-- | lib/gitlab/repository_cache.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/gitlab/repository_cache.rb b/lib/gitlab/repository_cache.rb index b7650f6ed81..b1bf3ca4143 100644 --- a/lib/gitlab/repository_cache.rb +++ b/lib/gitlab/repository_cache.rb @@ -3,9 +3,10 @@ module Gitlab class RepositoryCache attr_reader :repository, :namespace, :backend - def initialize(repository, backend = Rails.cache) + def initialize(repository, extra_namespace: nil, backend: Rails.cache) @repository = repository @namespace = "#{repository.full_path}:#{repository.project.id}" + @namespace += ":#{extra_namespace}" if extra_namespace @backend = backend end |