Reputation: 17991
In my Rails application I see a few 'cache' during SQL query in the server log:
[DEBUG] CACHE (0.0ms) SELECT
regions
.* FROMregions
WHEREregions
.name
= 'NY' LIMIT 1
I want to know if these caching are done by Rails, or by the MySQL itself? In another word, do these cached queries touch the database layer at all?
Upvotes: 6
Views: 1640
Reputation: 14068
The correct answer to the question is "the caching is done by Rails; the queries do not ever get to the database".
Upvotes: 5
Reputation: 1453
According to the following blog post on how to disable said feature its on rails cache and no the DB cache.
https://coderwall.com/p/tvybhq
Upvotes: -1