Module: Sequel::Plugins::QueryCache
- Defined in:
- lib/sequel-query-cache/version.rb,
lib/sequel-query-cache/driver/dalli.rb,
lib/sequel-query-cache/class_methods.rb,
lib/sequel-query-cache/dataset_methods.rb,
lib/sequel-query-cache/driver/memcache.rb,
lib/sequel-query-cache/serializer/json.rb,
lib/sequel-query-cache/instance_methods.rb,
lib/sequel-query-cache/serializer/message_pack.rb,
lib/sequel-query-cache/driver.rb,
lib/sequel-query-cache.rb
Defined Under Namespace
Modules: ClassMethods, DatasetMethods, InstanceMethods, Serializer
Classes: DalliDriver, Driver, MemcacheDriver
Constant Summary
collapse
- MAJOR_VERSION =
0
- MINOR_VERSION =
2
- TINY_VERSION =
1
- VERSION =
[MAJOR_VERSION, MINOR_VERSION, TINY_VERSION].join('.')
Class Method Summary
collapse
Class Method Details
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
# File 'lib/sequel-query-cache.rb', line 11
def self.configure(model, store, opts={})
model.instance_eval do
@cache_options = {
:ttl => 3600,
:cache_by_default => {
:always => false,
:if_limit => 1
}
}.merge(opts)
@cache_driver = Driver.from_store(
store,
:serializer => @cache_options.delete(:serializer)
)
end
end
|
.version ⇒ Object
10
|
# File 'lib/sequel-query-cache/version.rb', line 10
def self.version; VERSION; end
|