Module Sequel::Plugins::Caching::ClassMethods
In: lib/sequel/plugins/caching.rb

Methods

Attributes

cache_store  [R]  The cache store object for the model, which should implement the Ruby-Memcache API
cache_ttl  [R]  The time to live for the cache store, in seconds.

Public Instance methods

Copy the cache_store and cache_ttl to the subclass.

[Source]

    # File lib/sequel/plugins/caching.rb, line 42
42:         def inherited(subclass)
43:           super
44:           store = @cache_store
45:           ttl = @cache_ttl
46:           subclass.instance_eval do
47:             @cache_store = store
48:             @cache_ttl = ttl
49:           end
50:         end

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

[Source]

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

[Validate]