Hi Simo (et al),
1. I do not get the point defining the 'cache' interface.
The simplest would be to allow a switch in the constructor:
In that case, forget the injection: "@Autowire private Settings settings;"
public XSLTTransformer(boolean enableLRUCache)
public XSLTTransformer(final URL url, boolean enableLRUCache)
If the behaviour 'without LRU Cache' is only desired from within the sitemap, the first constructor is enough.
The parameter can be passed through through "setConfiguration" or setup(). Aren't 'settings' already a part of the
cocoon object that comes with the setup parameters.
2. Alternative: create two classes:
public class XSLTTransformerLRU extends AbstractSAXTransformer implements CachingPipelineComponent
public class XSLTTransformer extends AbstractSAXTransformer implements CachingPipelineComponent
I would say: the first is simpler.