Class ActiveRecord::Base
In: lib/rails_extensions/cachetastic_active_record_base.rb
Parent: Object

Methods

Included Modules

Cachetastic::Cacheable

Public Class methods

[Source]

    # File lib/rails_extensions/cachetastic_active_record_base.rb, line 9
 9:   def self.get_from_cache(key, self_populate = false)
10:     res = cache_class.get(key)
11:     if res.nil? && self_populate
12:       res = self.name.constantize.find(key)
13:       unless res.nil?
14:         res.cache_self
15:       end
16:     end
17:     res
18:   end

Public Instance methods

[Source]

   # File lib/rails_extensions/cachetastic_active_record_base.rb, line 5
5:   def cachetastic_key
6:     self.id
7:   end

[Validate]