Class: ProtectedBranch::CacheKey
- Inherits:
-
Object
- Object
- ProtectedBranch::CacheKey
- Includes:
- Gitlab::Utils::StrongMemoize
- Defined in:
- app/models/protected_branch/cache_key.rb
Overview
rubocop:disable Style/ClassAndModuleChildren – Same problem as in push_access_level.rb
Constant Summary collapse
- CACHE_ROOT_KEY =
'cache:gitlab:protected_branch'
Instance Method Summary collapse
-
#initialize(entity) ⇒ CacheKey
constructor
A new instance of CacheKey.
- #to_s ⇒ Object
Constructor Details
#initialize(entity) ⇒ CacheKey
Returns a new instance of CacheKey.
8 9 10 |
# File 'app/models/protected_branch/cache_key.rb', line 8 def initialize(entity) @entity = entity end |
Instance Method Details
#to_s ⇒ Object
12 13 14 |
# File 'app/models/protected_branch/cache_key.rb', line 12 def to_s [CACHE_ROOT_KEY, entity_scope, entity.id].join(':') end |