Module: RecordCache::MultiRead
- Defined in:
- lib/record_cache/multi_read.rb
Class Method Summary collapse
-
.disable(klass) ⇒ Object
Disable multi_read for a particular Store, e.g.
-
.test(store) ⇒ Object
Test the store if it supports read_multi calls If not, delegate multi_read calls to normal read calls.
Class Method Details
.disable(klass) ⇒ Object
Disable multi_read for a particular Store, e.g.
RecordCache::MultiRead.disable(ActiveSupport::Cache::DalliStore)
20 21 22 |
# File 'lib/record_cache/multi_read.rb', line 20 def disable(klass) @disabled_klass_names << klass.name end |
.test(store) ⇒ Object
Test the store if it supports read_multi calls If not, delegate multi_read calls to normal read calls
26 27 28 29 30 31 |
# File 'lib/record_cache/multi_read.rb', line 26 def test(store) return store if @tested.include?(store) @tested << store override_read_multi(store) unless read_multi_supported?(store) store end |