Hi Just entering this conversation a little late....
I've had an idea on how to implement the cache as a pipeline stage which should solve quite a few of the issues being discussed. The idea is actually to change the way the pipeline is built and run. At the moment if you have a pipeline, things are run from start to finish one item at a time. So say you have XSP | XSLT1 | XSLT2 The XSP generates some XML, which is passed to XSLT1, which transforms it and the output is passed to XSLT2. My idea is to restructure the way data is passed around. You start off at the end of the pipeline, with XSLT2, which asks the item before it in the pipeline for it's content. Rather than passing the data from one stylesheet to the next, so it's more like... XSLT2( XSLT1( XSP() ) ) ie, XSLT2 asks XSLT1 for it's content, XSLT1 gets content from the XSP.... which transforms it, and returns that to XSLT2.... Now caching becomes simply a layer in this structure... eg CACHE( XSLT2( XSLT1( XSP() ) ) or for incremental caching.... CACHE( XSLT2( CACHE( XSLT1( CACHE( XSP() ) ) ) ) ) or for Logicsheets... CACHE( XSLT2( CACHE( XSLT1( CACHE( XSP( CACHE( XSLT( XML() ) ) ) ) ) ) ) ) The cache merely checks any dependancies, and returns it's cached content. Data can be returned from one layer to the next with a list of associated dependancies. Comments? Mike.