• E
    Skip query cache for in_batches and friends · 6658e374
    Eugene Kenny 提交于
    The `find_each`, `find_in_batches` and `in_batches` APIs usually operate
    on large numbers of records, where it's preferable not to load them all
    into memory at once.
    
    If the query cache is enabled, it will hold onto the query results until
    the end of the execution context (request/job), which means the memory
    used is still proportional to the total number of records. These queries
    are typically not repeated, so the query cache isn't desirable here.
    6658e374
finder_methods.rb 20.3 KB