rails/rails — pull request #8074 by kennyj (2012-10-30 17:26:14+00:00)
Title: Fix #6951. Use query cache/uncache, when using not only database.yml but also DATABASE_URL.

This PR closes #6951.

If we use `DATABASE_URL`, `ActiveRecord::Base.configurations` is not populated. Thus we can't use query cache with DATABASE_URL.

See https://github.com/rails/rails/blob/master/activerecord/lib/active_record/query_cache.rb#L7