Active Record --- Connection Pool --- Database
|
|
SchemaCache
Active Record caches:
-
SchemaCache
is a YAML file to prevent hit the database - Columns
ActiveRecord::ConnectionAdapters::SchemaCache
—Model.columns_hash
- Query (
ActiveRecord::ConnectionAdapters::QueryCache
) - AssociationCache
ActiveRecord::Associations
ActiveRecord::StatementCache
QueryCache
, AssociationCache
is simply a Hash.
clear_query_cache
can clear query cache.
Calling reload
will bust these caches.