Why is rails query caching not working? -


in development environment have single request generating hundreds of same queries:

person load (24.4ms)  select "persons".* "persons" ("persons"."person_id" = 517) limit 1   . . .    person load (64.4ms)  select "persons".* "persons" ("persons"."person_id" = 517) limit 1 

why this? thought rails supposed enable query caching default on per request basis?

config/development.rb:   config.cache_classes = false   config.perform_caching = true     . . .     # show full error reports , disable caching   config.consider_all_requests_local       = true   config.action_view.debug_rjs             = true   config.action_controller.perform_caching = true   config.active_support.deprecation        = :log   

if you're connecting multiple databases (say using establish_connection in models), appears activerecord::base.connection gets query caching enabled. not sure if that's case here, tricky side effect of connecting multiple dbs.


Comments

Popular posts from this blog

Add email recipient to all new Trac tickets -

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -