Skip to content

Instantly share code, notes, and snippets.

@davidray
Created October 25, 2012 17:35
Show Gist options
  • Select an option

  • Save davidray/3954218 to your computer and use it in GitHub Desktop.

Select an option

Save davidray/3954218 to your computer and use it in GitHub Desktop.
Let's say I have an index view with this kind of hierarchy...
= render sidebar #no caching
= render partial:patrol, collection:@patrols #has a cache key for patrol
= render partial:users, collection:patrol.users #has a cache key for user
rake cache_digests:nested_dependencies TEMPLATE=manage/manage/index
[
"manage/manage/sidebar", #Didn't expect this because I don't cache it (yet)
{
"manage/manage/users": [
{
"manage/manage/patrol": [ #Expected this
"manage/manage/user", #Expected this
"manage/manage/add_new_member" #Expected this
]
},
"manage/manage/add_new_member" #Expected this
]
}
]
I sort of expected it to only list the dependencies for which I had set up cacheing, rather than all the dependencies it could figure out.
@dhh
Copy link

dhh commented Oct 25, 2012

Ah, I see. Yeah, there's no way of doing that. This just shows the nested dependencies between templates. That's by design. Feel free to see if you can improve the message, though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment