You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Yves Vindevogel <yv...@implements.be> on 2003/05/10 01:18:06 UTC
Prevent cache
This question may have appeared trillions of times, but I don't seem to
find it anywhere.....
How can I prevent caching in a single pipeline or match ??
All the rest may be cached as usual, except for this one match or
pipeline.
This is because there's a caching problem when using the OpenOffice
files. Cocoon (Tomcat) keeps them in cache and I don't know if it's the
match for reading the zip or the match for reading the xml file in the
zip.
Anyway, how can I prevent cache .... ;-))
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org
Re: Prevent cache
Posted by Joerg Heinicke <jo...@gmx.de>.
Yves Vindevogel wrote:
> Hmm, that's very strange.
>
> According to that document, any documents used in the document()
> function are not cached, right ?
No, the other way around. The XSLT is cached, but the documents accessed
by document() are not included in the cache key. The problem:
independent on the included document the cache for the transformation is
seen as valid and so the result is taken from the cache - you will get
the same site.
Alternative:
<map:match pattern="myXML">
<map:aggregate element="root">
<map:part src="theXMLIReallyWantToHave"/>
<map:part src="anIncludedDocument" element="included"/>
<map:part src="anotherIncludedDocument" element="included"/>
</map:aggregate>
</map:match>
Instead of using document() in the XSL you can now access the documents
via /root/included[1] or something similar. And the caching works again
as expected.
Joerg
> On Sat, 2003-05-10 at 01:26, Joerg Heinicke wrote:
>
>>http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10203
>>
>>alternative: sitemap aggregating
>>
>>Joerg
>>
>>Yves Vindevogel wrote:
>>
>>>This question may have appeared trillions of times, but I don't seem to
>>>find it anywhere.....
>>>
>>>How can I prevent caching in a single pipeline or match ??
>>>
>>>All the rest may be cached as usual, except for this one match or
>>>pipeline.
>>>
>>>This is because there's a caching problem when using the OpenOffice
>>>files. Cocoon (Tomcat) keeps them in cache and I don't know if it's the
>>>match for reading the zip or the match for reading the xml file in the
>>>zip.
>>>
>>>Anyway, how can I prevent cache .... ;-))
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org
Re: Prevent cache
Posted by Yves Vindevogel <yv...@implements.be>.
Hmm, that's very strange.
According to that document, any documents used in the document()
function are not cached, right ?
This is the XML used as a generator (not much;-)) )
<xml>
<document img="welcome" alt="Welcome to Implements">
<title>Welcome to Implements</title>
<source type="oowriter" src="home"/>
</document>
</xml>
And this is the XSLT (stripped a bit) that uses that document. Yet, I
do have caching problems.
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:office="http://openoffice.org/2000/office"
>
<xsl:include href="sxwfile.xsl"/>
<xsl:param name="source-directory"/>
<xsl:template match="/xml/document">
<html>
<head>
<title><xsl:value-of select="title"/></title>
</head>
<body>
<xsl:choose>
<xsl:when test="body">
<xsl:for-each select="body/*">
<xsl:copy-of select="."/>
</xsl:for-each>
</xsl:when>
<xsl:when test="source/@type='oowriter'">
<xsl:variable
name="doc">http://localhost/implements/sxw/<xsl:value-of
select="$source-directory"/>/<xsl:value-of
select="source/@src"/>.content.xml</xsl:variable>
<xsl:variable name="content" select="document($doc)"/>
<xsl:for-each
select="$content/office:document-content/office:body/*">
<xsl:apply-templates select="."/>
</xsl:for-each>
</xsl:when>
</xsl:choose>
</body>
</html>
</xsl:template>
<xsl:template match="text()"/>
</xsl:stylesheet>
On Sat, 2003-05-10 at 01:26, Joerg Heinicke wrote:
> http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10203
>
> alternative: sitemap aggregating
>
> Joerg
>
> Yves Vindevogel wrote:
> > This question may have appeared trillions of times, but I don't seem to
> > find it anywhere.....
> >
> > How can I prevent caching in a single pipeline or match ??
> >
> > All the rest may be cached as usual, except for this one match or
> > pipeline.
> >
> > This is because there's a caching problem when using the OpenOffice
> > files. Cocoon (Tomcat) keeps them in cache and I don't know if it's the
> > match for reading the zip or the match for reading the xml file in the
> > zip.
> >
> > Anyway, how can I prevent cache .... ;-))
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org
Re: Prevent cache
Posted by Joerg Heinicke <jo...@gmx.de>.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10203
alternative: sitemap aggregating
Joerg
Yves Vindevogel wrote:
> This question may have appeared trillions of times, but I don't seem to
> find it anywhere.....
>
> How can I prevent caching in a single pipeline or match ??
>
> All the rest may be cached as usual, except for this one match or
> pipeline.
>
> This is because there's a caching problem when using the OpenOffice
> files. Cocoon (Tomcat) keeps them in cache and I don't know if it's the
> match for reading the zip or the match for reading the xml file in the
> zip.
>
> Anyway, how can I prevent cache .... ;-))
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org
Re: Prevent cache
Posted by Yves Vindevogel <yv...@implements.be>.
Aha ! That's why I didn't find it. It's not in the docs yet, and it's
for a future version ;-))) I'm still using version 2.0. But I will
upgrade right away, this is in development phase, so no worries yet.
The zip thing .... it's very strange. I renamed the zipfile so that the
pipeline should give the FileNotFoundException error. Yet, it still
displayed my page as normal with the content of the old zipfile. I need
to restart tomcat in order to make the pipeline refresh the content of
the page.
On Sat, 2003-05-10 at 01:25, Alex Romayev wrote:
> <map:pipeline type="noncaching">
> ...
> </map:pipeline>
>
> This functionality is only available in cocoon-2.1.
>
> I'm not sure about how caching works with zip files,
> but since it uses last modified date, I would assume
> it will still worked correctly.
>
> -Alex
> --- Yves Vindevogel <yv...@implements.be>
> wrote:
> > This question may have appeared trillions of times,
> > but I don't seem to
> > find it anywhere.....
> >
> > How can I prevent caching in a single pipeline or
> > match ??
> >
> > All the rest may be cached as usual, except for this
> > one match or
> > pipeline.
> >
> > This is because there's a caching problem when using
> > the OpenOffice
> > files. Cocoon (Tomcat) keeps them in cache and I
> > don't know if it's the
> > match for reading the zip or the match for reading
> > the xml file in the
> > zip.
> >
> > Anyway, how can I prevent cache .... ;-))
> >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > cocoon-users-unsubscribe@xml.apache.org
> > For additional commands, e-mail:
> > cocoon-users-help@xml.apache.org
> >
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org
Re: Prevent cache
Posted by Alex Romayev <ro...@yahoo.com>.
<map:pipeline type="noncaching">
...
</map:pipeline>
This functionality is only available in cocoon-2.1.
I'm not sure about how caching works with zip files,
but since it uses last modified date, I would assume
it will still worked correctly.
-Alex
--- Yves Vindevogel <yv...@implements.be>
wrote:
> This question may have appeared trillions of times,
> but I don't seem to
> find it anywhere.....
>
> How can I prevent caching in a single pipeline or
> match ??
>
> All the rest may be cached as usual, except for this
> one match or
> pipeline.
>
> This is because there's a caching problem when using
> the OpenOffice
> files. Cocoon (Tomcat) keeps them in cache and I
> don't know if it's the
> match for reading the zip or the match for reading
> the xml file in the
> zip.
>
> Anyway, how can I prevent cache .... ;-))
>
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail:
> cocoon-users-help@xml.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org