You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lenya.apache.org by Robert Goene <ro...@goene.nl> on 2005/03/02 09:30:52 UTC

Caching

Hi All,

I am experiencing a problem with the caching mechanism of Cocoon. I use 
a agenda component on every page in my publication that gets its data 
from an external xml stream, which i open using the document() function 
in xslt. It seems that the different pages in my publication have 
different versions of the data stream; One page contains yesterdays data 
and another one todays. Could my conjecture of the document() function 
causing the problem be correct?

Any help would be appreciated!

Robert Goené

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: Caching

Posted by Mark Lundquist <ml...@comcast.net>.
On Mar 2, 2005, at 7:06 AM, Gregor J. Rothfuss wrote:

> if i recall correctly, document() is not cached.
>

That's correct.

You have:

	• some resource R...
	• ...that is served by a pipeline with a transformation using 
stylesheet S...
	• ...which includes somewhere the expression 'document(D)'.

So the cache validity for R depends on its freshness with respect to D, 
but Cocoon has no way of knowing about that dependency!  So, the cache 
doesn't get invalidated when it becomes stale with respect to D (in 
other words, when D is modified).

The "Cocoon way" is to use either (1) the Xinclude transformer, or (2) 
the <map:aggregate> element.  Both are easy and will give you correct 
results.

cheers,
—ml—


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: Caching

Posted by "Gregor J. Rothfuss" <gr...@apache.org>.
Robert Goene wrote:
> Hi All,
> 
> I am experiencing a problem with the caching mechanism of Cocoon. I use 
> a agenda component on every page in my publication that gets its data 
> from an external xml stream, which i open using the document() function 
> in xslt. It seems that the different pages in my publication have 
> different versions of the data stream; One page contains yesterdays data 
> and another one todays. Could my conjecture of the document() function 
> causing the problem be correct?

if i recall correctly, document() is not cached.

-- 
Gregor J. Rothfuss
COO, Wyona       Content Management Solutions    http://wyona.com
Apache Lenya                              http://lenya.apache.org
gregor.rothfuss@wyona.com                       gregor@apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org