loadResource(xslt, resource);
// default to use the cache option from the component if the endpoint did not have the contentCache parameter
boolean cache = getAndRemoveParameter(parameters, "contentCache", Boolean.class, contentCache);
if (!cache) {
return new ProcessorEndpoint(uri, this, xslt) {
@Override
protected void onExchange(Exchange exchange) throws Exception {
// force to load the resource on each exchange as we are not cached
loadResource(xslt, resource);
super.onExchange(exchange);
}
};
} else {
// we have already loaded xslt so we are cached
return new ProcessorEndpoint(uri, this, xslt);
}
}