Module: ArCache::ActiveRecord::Core::ClassMethods

Defined in:
lib/ar_cache/active_record/core.rb

Instance Method Summary collapse

Instance Method Details

#findObject

The #find use statement cache execute querying first, so need force skip.



8
9
10
# File 'lib/ar_cache/active_record/core.rb', line 8

def find(...)
  ArCache.skip? || ar_cache_table.disabled? ? super : all.find(...)
end

#find_byObject

The #find_by use statement cache execute querying first, so need force skip.



13
14
15
# File 'lib/ar_cache/active_record/core.rb', line 13

def find_by(...)
  ArCache.skip? || ar_cache_table.disabled? ? super : all.find_by(...)
end