module Sequel::Plugins::Caching::InstanceMethods

Public Instance Methods

before_update() click to toggle source

Remove the object from the cache when updating

Calls superclass method
    # File lib/sequel/plugins/caching.rb
134 def before_update
135   cache_delete
136   super
137 end
cache_key() click to toggle source

Return a key unique to the underlying record for caching, based on the primary key value(s) for the object. If the model does not have a primary key, raise an Error.

    # File lib/sequel/plugins/caching.rb
142 def cache_key
143   model.cache_key(pk)
144 end
delete() click to toggle source

Remove the object from the cache when deleting

Calls superclass method
    # File lib/sequel/plugins/caching.rb
147 def delete
148   cache_delete
149   super
150 end

Private Instance Methods

cache_delete() click to toggle source

Delete this object from the cache

    # File lib/sequel/plugins/caching.rb
155 def cache_delete
156   model.cache_delete_pk(pk)
157 end