tchandy/octopus — Issue #81: no rails sql cache when reading from slaves
Author: bdarrow
Created: 2012-03-06 05:29:16+00:00
State: open

Rails/activerecord typically caches SQL statements if they are identical in the same request. Typically in the log it shows the query with the word 'CACHE' next to it for queries hitting the sql cache. Using octopus in a fully replicated setup, the SQL cache is not used when reading from slaves. Only read requests explicitly sent to the master ".using(:master)" provide caching (and similarly read requests in a transaction)