Reputation: 901
I'm writing an application that uses swig directly.
I don't need swig caching and I wouldn't like to call swig.setDefaults({ cache: false });
.
So I try to call swig.compileFile(url, { cache: false }); , the problem is that the template appears to be always cached. What am I doing wrong ?
Upvotes: 0
Views: 905
Reputation: 18956
Code https://github.com/paularmstrong/swig/blob/v1.2.2/lib/swig.js#L608
Don't know why there is no code accessing to options.cache
, now I think it is more like a bug, or at least not good api design, because the document mention about multi-level options
Another option is clear cache in memory before compiling:
swig.invalidateCache();
var template = swig.compileFile('index.html');
Upvotes: 1