Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

problem when using fragment caching without digests #60

Open
Lorjuo opened this issue Mar 29, 2014 · 0 comments
Open

problem when using fragment caching without digests #60

Lorjuo opened this issue Mar 29, 2014 · 0 comments

Comments

@Lorjuo
Copy link

Lorjuo commented Mar 29, 2014

Hi, I have the following situation:
My navigation is organized tree-based structure that is rendered recursively by partials.
Because of that complex recursive structure I stopped trying to achieve this with cache_digests.
So I tried to implement a global fragment cache for the whole navigation at once that doesn't use digests:

<% cache('navigation', :skip_digest => false) do %>
  <%= render :partial => "layouts/navigation_element", collection: NavigationElement.roots, :as => :navigation_element %>
<% end %>

That worked as excepted and the navigation gets cached. But I also get some errors in the log that refers to cache_digest:
[ERROR] Couldn't find template for digesting: navigation_elements/navigation_element.html

I think the render directive still tries to generate a digest for navigation_element although it isn't used.

So I tried to use the skip_digest option, that doesn't seem to have any effect in here.

This error message has also been referenced in this issue: #31
and the recommendation was to just ignore it. But I do not really feel right with this.

Is there any possibility to just turn off cache_digests for this part of my homepage?

Thanks

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant