Module: ArCache::ActiveRecord::Core::ClassMethods
- Defined in:
- lib/ar_cache/active_record/core.rb
Instance Method Summary collapse
-
#find ⇒ Object
The #find and #find_by use ActiveRecord::StatementCache to execute querying first.
- #find_by ⇒ Object
Instance Method Details
#find ⇒ Object
The #find and #find_by use ActiveRecord::StatementCache to execute querying first. For ArCache, we need force skip ActiveRecord::StatementCache.
10 11 12 |
# File 'lib/ar_cache/active_record/core.rb', line 10 def find(...) ArCache.skip_cache? || ar_cache_table.disabled? ? super : all.find(...) end |
#find_by ⇒ Object
14 15 16 |
# File 'lib/ar_cache/active_record/core.rb', line 14 def find_by(...) ArCache.skip_cache? || ar_cache_table.disabled? ? super : all.find_by(...) end |