class
ActiveRecord::ConnectionAdapters::QueryCache::Store
v8.1.1 -
Show latest stable
- Superclass: Object
This is the actual query cache store.
It has an internal hash whose keys are either SQL strings, or arrays of two elements [SQL string, binds], if there are binds. The hash values are their corresponding ActiveRecord::Result objects.
Keeping the hash size under max size is achieved with LRU eviction.
The store gets passed a version object, which is shared among the query cache stores of a given connection pool (see ConnectionPoolConfiguration down below). The version value may be externally changed as a way to signal cache invalidation, that is why all methods have a guard for it.
Attributes
| [RW] | dirties |
| [RW] | dirties? |
| [RW] | enabled |
| [RW] | enabled? |
Files
- activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb