Module: FoundationApi::Model::Cached::ClassMethods

Defined in:
lib/foundation_api/model/cached.rb

Instance Method Summary collapse

Instance Method Details

#cached_find(id) ⇒ Object



7
8
9
# File 'lib/foundation_api/model/cached.rb', line 7

def cached_find(id)
  Rails.cache.fetch([self.name, id]) { find(id) }
end