config.getChild("cachable").getLocation() +
": please use 'cacheable', not 'cachable'");
}
this.cacheAll = config.getChild("cacheable").getValueAsBoolean(true);
this.documents = Collections.synchronizedMap(new ReferenceMap());
Configuration[] files = config.getChildren("file");
for (int i = 0; i < files.length; i++) {
boolean reload = files[i].getAttributeAsBoolean("reloadable", this.reloadAll);
boolean cache = files[i].getAttributeAsBoolean("cacheable", this.cacheAll);
this.src = files[i].getAttribute("src");
// by assigning the source uri to this.src the last one will be the default
// OTOH caching / reload parameters can be specified in one central place
// if multiple file tags are used.
this.documents.put(this.src, new DocumentHelper(reload, cache, this.src, this));
}
// init caches
this.cacheExpressions = config.getChild("cache-expressions").getValueAsBoolean(true);
if (this.cacheExpressions) {
this.expressionCache = new ReferenceMap(AbstractReferenceMap.SOFT, AbstractReferenceMap.SOFT);
this.expressionValuesCache = new ReferenceMap(AbstractReferenceMap.SOFT, AbstractReferenceMap.SOFT);
}
}