I'm trying to fragment cache a static portion of my site, but it doesn't seem to be working at all. I've set up config/application.rb
with the following:
config.action_controller.perform_caching = true
config.cache_store = :dalli_store
In my view, I have this:
<% cache 'cache_key' do %>
<!-- cached markup -->
<% end %>
I don't see anything in my logs about saving the fragment to cache or retrieving it on subsequent page loads. I've also tried using the default Rails :file_store
caching. I know that the cache store is working because using Rails.cache.fetch
works properly.
How can I get this to work?