cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sergio Carvalho <scarva...@criticalsoftware.com>
Subject Re: AW: [C2]: Proposal for caching
Date Thu, 25 Jan 2001 14:24:26 GMT
On Thu, 25 Jan 2001 08:19:31 -0500
Berin Loritsch <bloritsch@apache.org> wrote:

<snip/>
> FileGenerator {
>    Validator validator = new FileChangedValidator();
> 
>    ......
>  
>    generate() {
>       if (validator.hasChanged(file) {
>           // normal processing
>       } else {
>           // retrieve from cache.
>       }
>    }
> }

No, I don't like this. Imagining that every component must have this generate() code with
cache handling in there seems awkward. A component just has to be able to tell if it's dirty.
If it is not, then Cocoon handles cache retrieving.

And yes, Validator substitution is important. It does not clutter the sitemap as most of the
times the default Validator is used. When you do need a different Validator, it's definitely
better to be able to change it on the sitemap instead of subclassing the Generator just to
replace the Validator. 

> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
> 


-- 
--
Sergio Carvalho
---------------
scarvalho@criticalsoftware.com

If at first you don't succeed, skydiving is not for you

Mime
View raw message