Carsten Ziegeler schrieb:
Ralph Goers wrote:
Consider this:

URL baseUrl = new URL("file:///C:/temp/");
Pipeline pipeline = new NonCachingPipeline();
pipeline.addComponent(new FileGenerator(new URL(baseUrl, "xyz.xml"));
pipeline.addComponent(new XSLTTransformer(new URL(baseUrl, "xyz.xslt"));
pipeline.addComponent(new XMLSerializer());
pipeline.invoke(new InvocationImpl(System.out));

This simple pipeline has these potentially cacheable components; xyz.xml, xyz.xslt, the result of the XSLT transformation, and the final result of the pipeline. As it relates to the pipeline I don't see how the URL.getLastModified() really helps as it could apply to any of these items, two of which aren't even URLs.

Hmm, I think this isn't different to what we have today with sources.
Today: FileGenerator, XSLTTransformer use a source as input
       For caching: this source provides a validity object
URLs: FileGenerator, XSLTTransformer use a url as input
       For caching: this url provides a last modified date
XMLSerializer in both cases returns a fake (or always valid) validity object/last modified.
Thanks for responding ;-)
This is exactly the way I implemented the simple caching approach for Corona. Patch from me is still due (I know, shame on me) - work load is currently quite high...

Now, as I responded to Steven, last modified covers most use cases but not all of the use cases the validity object can handle. This is where we have to think about a good way to have the same.

Carsten

Reply via email to