cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jesper Rasmussen ...@weburb.net>
Subject Re: Antwort: caching
Date Fri, 30 Nov 2001 13:53:04 GMT
I have not implemented anything. i have not made any java classes. I only
usse the standard ResourceReader, FileGenerator and HTMLSerializer.

so what you say is that i can extend ResourceReader and override the
getLastModified(). No i havent done that but i can do that.
However I was hoping to avoid that, and even avoiding using the
resourceReader and use the FileGenerator.
Is that possible?
I guess in order to do that i would need to extend the FileGenerator and
override generateValidity() ?

If i do the first solution, i would then need to have one machh with the new
reader and another match which generates from the thi first. Will the last
Modifeded then get probagated through the pipeline so it eventually will get
cached at the serialization step?

thanks again.
anyway what you sugests will solve the problem.

cheers
Jesper

gcasper@s-und-n.de wrote:

> Did you implement getLastModified() ?
>
> Guido
>
> jr schrieb:
> > Hi all,
> > I have a system where i have a servlet generating xml from some ejb's
> > I use cocoon to apply xsl to the xml and produce the various outputs.
> > I have tried two methods, and both works fine, but i need to cache the
> > result ans the servlet is QUITE slow and rarely changes its output.
> >
> > i have tried this:
> >
> >   <map:match pattern="test">
> >     <map:generate src="http://server/genXML"/>
> >     <map:transform src="stylesheets/transform.xsl"/>
> >     <map:serialize/>
> >    </map:match>
> >
> > and this
> >   <map:match pattern="readXML">
> >     <map:read src="http://server/genXML"  mime-type="text/xml"/>
> >    </map:match>
> >
> >   <map:match pattern="test2">
> >     <map:generate src="readXML"/>
> >     <map:transform src="stylesheets/transform.xsl"/>
> >     <map:serialize/>
> >    </map:match>
> >
> > as stated it all work fine but is not cached as far as i can tell.
> > Is there a way for me to monitor the cache. but im quite sure it is not
> > cached as it is still very slow.
> >
> > I have striped my sitemap.xmap to the minimum and is deploying the
> > application with all the libs from cocon. so im not as such using
> > cocoon.war
> >
> > I guess my problem is that i need something more in either sitemap og
> > xconf
> >
> > sitemap:
> >
> >  <map:components>
> >
> >   <map:generators default="file">
> >    <map:generator  name="file"
> > src="org.apache.cocoon.generation.FileGenerator"
> >                    pool-max="32" pool-min="16" pool-grow="4"/>
> >   </map:generators>
> >
> >   <map:transformers default="xslt">
> >    <map:transformer     name="xslt"
> > src="org.apache.cocoon.transformation.TraxTransformer"
> >                         pool-max="32" pool-min="16" pool-grow="4">
> >     <use-store>true</use-store>
> >     <use-request-parameters>false</use-request-parameters>
> >     <use-browser-capabilities-db>false</use-browser-capabilities-db>
> >    </map:transformer>
> >   </map:transformers>
> >
> >   <map:readers default="resource">
> >    <map:reader name="resource"
> > src="org.apache.cocoon.reading.ResourceReader"/>
> >   </map:readers>
> >
> >   <map:serializers default="html">
> >       <map:serializer  name="html"
> >        mime-type="text/html"
> >       src="org.apache.cocoon.serialization.HTMLSerializer"/>
> >       </map:serializer>
> >   </map:serializers>
> >
> > and the pipline with the above lines.
> >
> >
> > in cocoon.xconf i have:
> >
> >   <stream-pipeline
> > class="org.apache.cocoon.components.pipeline.CachingStreamPipeline"
> >                    pool-max="32" pool-min="16" pool-grow="4"/>
> >
> >   <stream-cache
> > class="org.apache.cocoon.components.store.MRUMemoryStore">
> >      <parameter name="freememory" value="1000000"/>
> >      <parameter name="heapsize" value="60000000"/>
> >      <parameter name="cleanupthreadinterval" value="10"/>
> >      <parameter name="maxobjects" value="100"/>
> >      <parameter name="usecleanupthread" value="true"/>
> >      <parameter name="threadpriority" value="5"/>
> >      <parameter name="filesystem" value="true"/>
> >   </stream-cache>
> >
> >
> >   <event-pipeline
> > class="org.apache.cocoon.components.pipeline.CachingEventPipeline"
> >                    pool-max="32" pool-min="16" pool-grow="4"/>
> >
> >   <event-cache
> > class="org.apache.cocoon.components.store.MRUMemoryStore">
> >      <parameter name="freememory" value="1000000"/>
> >      <parameter name="heapsize" value="60000000"/>
> >      <parameter name="cleanupthreadinterval" value="10"/>
> >      <parameter name="maxobjects" value="100"/>
> >      <parameter name="usecleanupthread" value="true"/>
> >      <parameter name="threadpriority" value="5"/>
> >      <parameter name="filesystem" value="true"/>
> >   </event-cache>
> >
> > I have read the docs on caching, an i think what i do is right, but i
> > dont quite understand the xmlserilization part, but i have tried to
> > include
> > <xml-serializer
> >     class="org.apache.cocoon.components.sax.XMLByteStreamCompiler"/>
> >
> > <xml-deserializer
> >     class="org.apache.cocoon.components.sax.XMLByteStreamInterpreter"/>
> >
> > but to no avail.
> >
> > The bedst would be if it was cached at the html setilization step, but
> > at xml generation step would be ok. I have also tried to generate the
> > xml with generate / xml seriliaze instead of read.
> >
> > Thanks alot for any inputs. Thanks.
> > I really hope to solve this, as the system cant go live till i have
> > solved the performance problem.
> >
> > thanks again
> > Jesper
> >
> >
> >
> > ---------------------------------------------------------------------
> > 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>
> >
>
> ---------------------------------------------------------------------
> 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>


---------------------------------------------------------------------
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