title: Rails models reloaded mid-request resulting in AssociationTypeMismatch
body: <p>We've been running into a problem in Rails 3.1 when we run in development mode.   It seems that our models sometimes get reloaded mid request, and a new object_id is set on our model's classes.  Which then results in an ActiveRecord::AssociationTypeMismatch</p>
  
  <blockquote>
    <p>ActiveRecord::AssociationTypeMismatch Character(#2194222580) expected,
    got Character(#2185863000)</p>
  </blockquote>
  
  <p>If we turn <code>config.cache_classes = true</code> in <code>development.rb</code> the problem seems to go away, but it's unrealistic to develop like that as we'll have to constantly be restarting our servers.</p>
  
  <p>Anybody have an idea why models may be reloaded mid request, or if there is a way we could force the cache to last through the entire request?</p>