Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you disable the query cache in rails 4.x?

How do you disable the query cache in rails 4.x? It appears that wrapping my queries in model.uncached {} does not stop the query cache. Is there another setting?

like image 948
Dewayne Avatar asked Dec 16 '13 13:12

Dewayne


1 Answers

Ah, it appears the answer is to add the following to your application.rb

config.middleware.delete "ActiveRecord::QueryCache"
like image 140
Dewayne Avatar answered Oct 19 '22 10:10

Dewayne