You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Olivier Richaud <ri...@cstb.fr> on 2000/07/26 16:06:43 UTC

Cocoon and caching capabilities

With cocoon I incorporate remote XML document in my XSL in order to build an
aggregate of several XML pages in one page as follows:

 <xsl:apply-templates select="document(http://host/doc.xml)"/>

Nevertheless, the remote http://host/doc.xml is being cached by cocoon so
that I never get the remote XML document reloaded. And this document is
subject to frequent changes. I cannot afford letting Coocon cache pages for
me. How can I do that, I mean not having those documents cached?

Thanks in advance.

Olivier Richaud
CSTB
office: +33 4 93 95 67 24
mobile: +33 6 87 52 53 17
www: http://cic.cstb.fr


Re: Cocoon and caching capabilities

Posted by Ulrich Mayring <ul...@denic.de>.
Olivier Richaud wrote:
> 
> Does this mean that I must use XSP (which is not the case!!!!!)? Otherwise,
> an example would be welcome.

Yes, you must use XSP. cocoon has no way of knowing which files another
file includes in some way, therefore the hasChanged() method was
introduced. However, if you are not using XSP presently, then there is
another problem. If, for example, you were to use XInclude to include
the other files, then the cache doesn't come into it. What method are
you using for inclusion?

Ulrich

-- 
Ulrich Mayring
DENIC eG, Systementwicklung

Re: Cocoon and caching capabilities

Posted by Mark Washeim <31...@t-online.de>.
on 26/7/00 5:45 pm, Olivier Richaud at richaud@cstb.fr wrote:

>> Olivier Richaud wrote:
>>> 
>>> With cocoon I incorporate remote XML document in my XSL in order to
> build
>>> an
>>> aggregate of several XML pages in one page as follows:
>>> 
>>> <xsl:apply-templates select="document(http://host/doc.xml)"/>
>>> Nevertheless, the remote http://host/doc.xml is being cached by cocoon
> so
>>> that I never get the remote XML document reloaded. And this document is
>>> subject to frequent changes. I cannot afford letting Coocon cache pages
> for
>>> me. How can I do that, I mean not having those documents cached?
>> 
>> Maybe the remote document is not cached at all, but rather cocoon only
>> looks at the original file and sees it unchanged, so serves it from the
>> cache. So you must tell cocoon to never cache the original document, you
>> just need to implement the hasChanged() method in your original document
>> and make it return "true" always.
> 
> Does this mean that I must use XSP (which is not the case!!!!!)? Otherwise,
> an example would be welcome.
> 
> Whatever, thanks for your answer.
> 
> Olivier.
> 
> 

If you can do the aggregation at an earlier point, use xinclude. It always
checks the currency of the document and returns cached if the document
hasn't changed. That, however, requires you do the aggregation in an xml doc
prior to the xsl transform . . .
-- 
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

 



Re: Cocoon and caching capabilities

Posted by Olivier Richaud <ri...@cstb.fr>.
> Olivier Richaud wrote:
> >
> > With cocoon I incorporate remote XML document in my XSL in order to
build
> > an
> > aggregate of several XML pages in one page as follows:
> >
> >  <xsl:apply-templates select="document(http://host/doc.xml)"/>
> > Nevertheless, the remote http://host/doc.xml is being cached by cocoon
so
> > that I never get the remote XML document reloaded. And this document is
> > subject to frequent changes. I cannot afford letting Coocon cache pages
for
> > me. How can I do that, I mean not having those documents cached?
>
> Maybe the remote document is not cached at all, but rather cocoon only
> looks at the original file and sees it unchanged, so serves it from the
> cache. So you must tell cocoon to never cache the original document, you
> just need to implement the hasChanged() method in your original document
> and make it return "true" always.

Does this mean that I must use XSP (which is not the case!!!!!)? Otherwise,
an example would be welcome.

Whatever, thanks for your answer.

Olivier.


Re: Cocoon and caching capabilities

Posted by Ulrich Mayring <ul...@denic.de>.
Olivier Richaud wrote:
> 
> With cocoon I incorporate remote XML document in my XSL in order to build
> an
> aggregate of several XML pages in one page as follows:
> 
>  <xsl:apply-templates select="document(http://host/doc.xml)"/>
> Nevertheless, the remote http://host/doc.xml is being cached by cocoon so
> that I never get the remote XML document reloaded. And this document is
> subject to frequent changes. I cannot afford letting Coocon cache pages for
> me. How can I do that, I mean not having those documents cached?

Maybe the remote document is not cached at all, but rather cocoon only
looks at the original file and sees it unchanged, so serves it from the
cache. So you must tell cocoon to never cache the original document, you
just need to implement the hasChanged() method in your original document
and make it return "true" always.

Ulrich

-- 
Ulrich Mayring
DENIC eG, Systementwicklung

Re: Cocoon and caching capabilities

Posted by Donald Ball <ba...@webslingerZ.com>.
On Wed, 26 Jul 2000, Olivier Richaud wrote:

> With cocoon I incorporate remote XML document in my XSL in order to build an
> aggregate of several XML pages in one page as follows:
> 
>  <xsl:apply-templates select="document(http://host/doc.xml)"/>
> 
> Nevertheless, the remote http://host/doc.xml is being cached by cocoon so
> that I never get the remote XML document reloaded. And this document is
> subject to frequent changes. I cannot afford letting Coocon cache pages for
> me. How can I do that, I mean not having those documents cached?

cocoon isn't caching this, xalan is caching this (xalan provides the
document() function). i seem to remember scott telling me a long while
back that xalan actually caches these documents permanently, e.g. never
check for changes. might be worthwhile to check on that. in any case, you
can use xinclude processor to include xml from multiple files - and it
_does_ cache properly (or it should - evidence to the contrary is
solicited)

- donald