ActiveRecord::ConnectionAdapters::QueryCache


Files

Methods

Attributes

[R] [R]

Public Class methods

dirties_query_cache (base, *method_names)

included (base)

Public Instance methods

cache () {|| ...}

Enable the query cache within the block.

clear_query_cache ()

Clears the query cache.

One reason you may wish to call this method explicitly is between queries that ask the database to randomize results. Otherwise the cache would see the same SQL query and repeatedly return the same result each time, silently undermining the randomness you were expecting.

columns_with_query_cache (*args)

select_all_with_query_cache (*args)

uncached () {|| ...}

Disable the query cache within the block.