visionmedia/consolidate.js — pull request #76 by fatjonny (2012-11-26 22:32:38+00:00)
Title: Invalidates built-in dust cache if caching disabled

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:

index.dust
```
{>"layout"/}

{

example

{+body/}

```

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?