Invalidates built-in dust cache if caching disabled #76

merged 1 commit into from Apr 4, 2013

4 participants


My problem: Dust checks it's internal cache before calling dust.onLoad which has the effect that any template included within another template gets automatically cached and setting options.cache has no effect on the internal dust cache.

For example, if you have:



  my index body

and layout.dust


If you view index, then add something to layout.dust after having viewed index once, you will have to restart the server to see your change to layout reflected.

Ideally I would be able to modify the dust.register function, but I don't see how to do that since dust always tries to read from dust.cache.

This was the best solution I could come up with, any other suggestions?

tj commented Dec 22, 2012

hmm sounds ok i guess if it works! needs a rebase against master


I've tested this and it works. Please merge so we can delete our fork 👍


It may still need a rebase


@ForbesLindesay are you going to do the rebase so we can get it merged in?

PS thanks for solving this issue.


I think I messed up the rebase although I am not entirely sure how, but now more than just my one line is changed. I can just fork the repo again and re-do that pull request to make it be correct.


@fatjonny you don't need to redo the pullrequest, just force push to this branch


Thanks @razic, that made sense. The commit now looks up to date and correct to me.



@tj tj merged commit 44260da into tj:master Apr 4, 2013

@visionmedia thanks!

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