cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vadim Gritsenko <vadim.gritse...@verizon.net>
Subject Re: Cacheable DirectoryGenerator
Date Tue, 13 May 2003 21:01:23 GMT
Sylvain Wallez wrote:

> Hi folks,
>
> I've updated the DirectoryGenerator so it is cacheable.
>
> The problem of this generator, is that the cache validity cannot be 
> known until after generation. So the validity object returned to the 
> pipeline is initially just a empty placeholder, and is filled with 
> file names and modification dates during the pipeline execution phase. 
> When pipeline execution is finished, the produced content goes into 
> the cache with a validity object which is correctly filled.
>
> Et voilĂ  ! This technique can be used for others components as well. 
> The first that comes to mind is the TraxTransformer to track sources 
> included using the document() function. 


Yes, that's how it could be fixed. I just had not needed that feature 
hard enough at a time...

Vadim


> And to avoid too many calls to the filesystem in search for modified 
> files, the DirectoryGenerator has an additional parameter named 
> "refreshDelay" which defines the minimum delay between filesystem 
> checks. The default is 1 second.
>
> Enjoy,
> Sylvain 




Mime
View raw message