13
My version is:
- Rails: 3.2.6
- dalli: 2.1.0
My env is:
- config.action_controller.perform_caching = true
- config.cache_store = :dalli_store, 'localhost:11211', {:namespace => 'MyNameSpace'}
When I write:
Rails.cache.fetch(key) do
User.where('status = 1').limit(1000)
end
The user model can't be cached. If I use
Rails.cache.fetch(key) do
User.all
end
it can be cached. How to cache query result?