diff options
Diffstat (limited to 'app/models/pages')
-rw-r--r-- | app/models/pages/virtual_domain.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/app/models/pages/virtual_domain.rb b/app/models/pages/virtual_domain.rb index 497f67993ae..119cc7fc166 100644 --- a/app/models/pages/virtual_domain.rb +++ b/app/models/pages/virtual_domain.rb @@ -2,8 +2,9 @@ module Pages class VirtualDomain - def initialize(projects, trim_prefix: nil, domain: nil) + def initialize(projects:, cache: nil, trim_prefix: nil, domain: nil) @projects = projects + @cache = cache @trim_prefix = trim_prefix @domain = domain end @@ -27,8 +28,12 @@ module Pages paths.sort_by(&:prefix).reverse end + def cache_key + @cache_key ||= cache&.cache_key + end + private - attr_reader :projects, :trim_prefix, :domain + attr_reader :projects, :trim_prefix, :domain, :cache end end |