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, line 126 def before_update cache_delete super 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, line 134 def cache_key model.cache_key(pk) end
delete()
click to toggle source
Remove the object from the cache when deleting
Calls superclass method
# File lib/sequel/plugins/caching.rb, line 139 def delete cache_delete super end
Private Instance Methods
cache_delete()
click to toggle source
Delete this object from the cache
# File lib/sequel/plugins/caching.rb, line 147 def cache_delete model.cache_delete_pk(pk) end