cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Washeim <esa...@canuck.com>
Subject Re: cache and performance
Date Wed, 05 Jul 2000 14:53:56 GMT
on 4/7/00 6:41 pm, Stefano Mazzocchi at stefano@apache.org wrote:

> Torsten Curdt wrote:
>> 
>> [snip]
>>>> About the cache: when is it used? I tested with the Cocoon standard
>>>> examples. The HelloWorld example is served from cache but the 'First XSP
>>>> Page' example is not! Why?
>>> 
>>> Because it's dynamically generated and it doesn't implement any
>>> "hasChanged()" logic that tells the cache system whether or not the page
>>> should be cached.
>> 
>> Most of the projects we are working on are so heavily dynamic that this
>> would mean almost none of the pages can be fully cached!? :-(
> 
> There is nothing really dynamic, everything is "piece-wise static". Even
> if you page changes each second (because you have a second timer on top)
> but it's requested 10 times per second, you achieve 10x speed by
> applying a caching strategy.
> 
> Of course, your caching strategy must take less that recreate the page
> on average.
> 
>> What do you mean with page? The XML-source part not extended by XSP or what?
>> 
>> What are the caching strategy for the XML,XSLT,XSP,SQL parts in Cocoon1
>> vs. Cocoon2?!
> 
> Exactly the same: we provide the caching architecture, you write your
> caching strategy.


We implement hasChanged() in some xsp pages and have an object cache (a
hash) local to that producer/generator. This works quite well and permits
the page to check the state of it's elements (they are objects which depend
on documents in turn and have their own methods to check currency) and still
use Cocoon's object cache.

In short. The object that's cached is the resultant document, unchanged from
when last completely produced and sent to the cient, so long as the elements
have not changed . . .

-- 
Mark (Poetaster) Washeim

'On the linen wrappings of certain mummified remains
found near the Etrurian coast are invaluable writings
that await translation.

Quem colorem habet sapientia?'

Evan S. Connell

 



Mime
View raw message