cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefano Mazzocchi <stef...@apache.org>
Subject Re: Cacheable DirectoryGenerator
Date Tue, 13 May 2003 21:36:31 GMT
on 5/13/03 3:44 PM 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.
> 
> 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.

Can I say you are my hero?!? You saved my poor cocoon running linotype
sooooooo many calculations.

thank you.

-- 
Stefano.



Mime
View raw message