Class | ActiveRecord::Base |
In: |
lib/rails_extensions/cachetastic_active_record_base.rb
|
Parent: | Object |
Returns an object from the cache for a given key. If the object returned is nil and the self_populate parameter is true then the key will be used to try and find the object in the database, set the object into the cache, and then return the object.
Unless the object is a new ActiveRecord object this method will store the object in the cache using the object‘s ID as the key.