atpl
Version:
A complete and fast template engine fully compatible with twig and similar to jinja with zero dependencies.
24 lines (23 loc) • 655 B
JavaScript
///<reference path='imports.d.ts'/>
;
var TemplateConfig = (function () {
function TemplateConfig(cache) {
if (cache === void 0) { cache = true; }
this.cache = cache;
}
TemplateConfig.prototype.setCacheTemporal = function (value, callback) {
var oldValue = this.cache;
this.cache = value;
try {
return callback();
}
finally {
this.cache = oldValue;
}
};
TemplateConfig.prototype.getCache = function () {
return this.cache;
};
return TemplateConfig;
}());
exports.TemplateConfig = TemplateConfig;