rails/rails — pull request #3974 by mreinsch (2011-12-14 06:09:10+00:00)
Title: query cache being left enabled after routing error

After a 404 error triggered by a routing error, ActiveRecord's query cache stays enabled.

We observed this issue through something similar as described in issue #2333, where some model test cases started to fail when run after testing a 404 error page. In that case nobody is calling ActiveRecord::QueryCache::BodyProxy#close.

I tracked the issue down to actionpack/lib/action_dispatch/middleware/show_exceptions.rb#call. That one isn't calling close on body.