title: Memcached miss on every fetch on Rails with Dalli gem
body: <p>So I have this basic action, which is accessed by ajax call, and fetches the most popular post, stores them in the cache and then displays in the users view:</p>
  
  <pre><code>def trending
    @trends = Rails.cache.fetch('trends', :expires_in=&gt;1.hour) { Post.trends.all }
    respond_to do |format|
      format.js {render :layout=&gt;false}
    end
  end
  </code></pre>
  
  <p><strong>config/development.rb</strong></p>
  
  <pre><code>  config.cache_classes = false
  
    # Log error messages when you accidentally call methods on nil.
    config.whiny_nils = true
  
    # Show full error reports and enable caching
    config.consider_all_requests_local       = true
    config.action_view.debug_rjs             = true
    config.action_controller.perform_caching = true
    config.cache_store = :dalli_store
  </code></pre>
  
  <p>Now the problem that I have is that on every fetch cache is missed. Any ideas what might be wrong?</p>
  
  <p>Thanks!</p>