title: Ruby on rails : memcached read value is nil
body: <p>I've inherited a Rails project that looks like it's using memcached.</p>
  
  <p>I have a controller, in one method I'm storing a value in the cache with:</p>
  
  <pre><code> Rails.cache.write("key", @var)
  </code></pre>
  
  <p>in another method subsequently called in the same controller I read it back with:</p>
  
  <pre><code>@var = Rails.cache.read("key")
  </code></pre>
  
  <p>and the variable is nil.  Why is caching not working?
  I've just started using ROR so there's a good chance it's something pretty basic.</p>