Module: CacheableAttributes

Extended by:
ActiveSupport::Concern
Included in:
Appearance, ApplicationSetting
Defined in:
app/models/concerns/cacheable_attributes.rb

Instance Method Summary collapse

Instance Method Details

#cache!Object



85
86
87
# File 'app/models/concerns/cacheable_attributes.rb', line 85

def cache!
  self.class.cache_backend.write(self.class.cache_key, self, expires_in: Gitlab.config.gitlab['application_settings_cache_seconds'] || 60)
end