diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/models/concerns/attribute_cacheable.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/app/models/concerns/attribute_cacheable.rb b/app/models/concerns/attribute_cacheable.rb index 34617489ac5..9ddef3c033b 100644 --- a/app/models/concerns/attribute_cacheable.rb +++ b/app/models/concerns/attribute_cacheable.rb @@ -11,10 +11,6 @@ module AttributeCacheable end end - def cache_attribute_key(key) - "#{self.class.name}:attributes:#{self.id}:#{key}" - end - def cached_attribute(key) Gitlab::Redis::SharedState.with do |redis| redis.get(cache_attribute_key(key)) @@ -28,4 +24,10 @@ module AttributeCacheable end end end + + private + + def cache_attribute_key(key) + "#{self.class.name}:attributes:#{self.id}:#{key}" + end end |