Class/Module Index [+]

Quicksearch

Sequel::Plugins::Caching::ClassMethods

Attributes

cache_ignore_exceptions[R]

If true, ignores exceptions when gettings cached records (the memcached API).

cache_store[R]

The cache store object for the model, which should implement the Ruby-Memcache (or memcached) API

cache_ttl[R]

The time to live for the cache store, in seconds.

Public Instance Methods

inherited(subclass) click to toggle source

Copy the necessary class instance variables to the subclass.

# File lib/sequel/plugins/caching.rb, line 62
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
set_cache_ttl(ttl) click to toggle source

Set the time to live for the cache store, in seconds (default is 3600, # so 1 hour).

# File lib/sequel/plugins/caching.rb, line 57
def set_cache_ttl(ttl)
  @cache_ttl = ttl
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.