title: Why am I seeing test environment data in my development Rails cache?
body: <p>I am attempting to cache a class variable like so:</p>
  
  <pre><code>Rails.cache.write("@@page_types", @@page_types)
  </code></pre>
  
  <p>This method is called within a class I have called PageTypes.</p>
  
  <p>If I start up a rails console and do:</p>
  
  <pre><code>Rails.cache.write("@@page_types", nil)
  Rails.cache.read("@@page_types")
  </code></pre>
  
  <p>I get nil.  I leave the console open and do this in another window:</p>
  
  <p>rake test:units</p>
  
  <p>When the tests are over, I switch back to my rails console window and do</p>
  
  <pre><code>Rails.cache.read("@@page_types")
  </code></pre>
  
  <p>It returns an array of my test page types!  I'm positive they are from my test db because the models all have super high IDs, while my dev data all has very low ones.</p>
  
  <p>I suppose I could append Rails.env to the cache keys, but it seems like the two caches shouldn't be mixing....</p>