module Sequel::Plugins::Caching::InstanceMethods
Public Instance Methods
Source
# File lib/sequel/plugins/caching.rb 137 def before_update 138 cache_delete 139 super 140 end
Remove the object from the cache when updating
Calls superclass method
Source
# File lib/sequel/plugins/caching.rb 145 def cache_key 146 model.cache_key(pk) 147 end
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
.
Source
# File lib/sequel/plugins/caching.rb 150 def delete 151 cache_delete 152 super 153 end
Remove the object from the cache when deleting
Calls superclass method
Private Instance Methods
Source
# File lib/sequel/plugins/caching.rb 158 def cache_delete 159 model.cache_delete_pk(pk) 160 end
Delete this object from the cache