Module | ActiveRecord::ConnectionAdapters::QueryCache
In: | lib/active_record/connection_adapters/abstract/query_cache.rb

### Methods

cache clear_query_cache columns_with_query_cache dirties_query_cache included select_all_with_query_cache uncached

### 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.

[Validate]