If true, ignores exceptions when gettings cached records (the memcached API).
Delete the cached object with the given primary key.
# File lib/sequel/plugins/caching.rb, line 57 def cache_delete_pk(pk) cache_delete(cache_key(pk)) end
Return the cached object with the given primary key, or nil if no such object is in the cache.
# File lib/sequel/plugins/caching.rb, line 63 def cache_get_pk(pk) cache_get(cache_key(pk)) end
Return a key string for the given primary key.
# File lib/sequel/plugins/caching.rb, line 68 def cache_key(pk) raise(Error, 'no primary key for this record') unless pk.is_a?(Array) ? pk.all? : pk "#{self}:#{Array(pk).join(',')}" end
Copy the necessary class instance variables to the subclass.
# File lib/sequel/plugins/caching.rb, line 74 def inherited(subclass) super store = @cache_store ttl = @cache_ttl cache_ignore_exceptions = @cache_ignore_exceptions subclass.instance_eval do @cache_store = store @cache_ttl = ttl @cache_ignore_exceptions = cache_ignore_exceptions end end
Generated with the Darkfish Rdoc Generator 2.