cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vadim Gritsenko" <vadim.gritse...@verizon.net>
Subject RE: [C2] DeltaTimeCacheValidity?
Date Wed, 27 Mar 2002 00:38:37 GMT
> From: Rune Sandnes [mailto:rune@klapp.no]
> 
> I have set up caching in an XSP page with several ESQL statements.
> One version bases the CacheValidity object on a timestamp that it gets
from
> the database, like this:
> 
>      public CacheValidity generateValidity() {
>           return new TimeStampCacheValidity(documentTimestamp);
>      }
> 
> 
> But in some cases I just want to base the caching on a simple timeout,
like
> this:
> 
>      public CacheValidity generateValidity() {
>           return new DeltaTimeCacheValidity(10);
>      }
> 
> If I am not mistaken, the ESQL statements will be performed anyway in
both
> cases.

You are mistaken. XSP will be executed only when returned validity is
null or not valid anymore (for the same key), or this is the first
execution.

Vadim

> Is there any way to trigger the cache mechanism before the ESQL
statements to
> save computing time in the second example?
> 
> Regards,
> Rune,
> Trondheim,
> Norway
> 


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

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


Mime
View raw message