модуль ActiveRecord::QueryCache::ClassMethods
Публичные методы экземпляров
# File activerecord/lib/active_record/query_cache.rb, line 9
def cache(&block)
if connected? || !configurations.empty?
connection.cache(&block)
else
yield
end
end Включить кэширование запросов в блоке, если Active Record настроен. Если нет, выполнит заданный блок.
# File activerecord/lib/active_record/query_cache.rb, line 19
def uncached(&block)
if connected? || !configurations.empty?
connection.uncached(&block)
else
yield
end
end Отключить кэширование запросов в блоке, если Active Record настроен. Если нет, выполнит заданный блок.
© 2004–2018 David Heinemeier Hansson
Licensed under the MIT License.