Hello,
now I'm using CachingCIncludeTransformer, but sometimes I encounter caching
problems and hence unwanted recompilation to Java classes in some cases.

In my test case I have 2 serverpages with 2 variations and following resulst
under Cocoon 2.0.3 and Cocoon 2.0.4 (changed hash keys):
http://durdina/ebanking/main/main.xml - cached under 2.0.3, always
recompiled under 2.0.4
http://durdina/ebanking/banks2/banks.xml - cached under 2.0.3, always
recompiled under 2.0.4
and same pages copied to opposite directories
http://durdina/ebanking/main/banks.xml - cached under 2.0.3, always
recompiled under 2.0.4
http://durdina/ebanking/banks2/main.xml - always recompiled under 2.0.3,
cached under 2.0.4

According to logs, xml_source (from */*.source pipeline) objects are always
cached, but serverpagers generator which uses cocoon:/ protocol loads
compiled Java classes from cache only and only if they satisfy some specific
name condition (URL). For examle it helped me to rename banks2/main.xml file
to 
banks2/bmain.xml to initiate caching of the same compiled source
(org.apache.cocoon.www.cocoon_._.banks2.main_source) instead of throwing it
away and recompiling the page on every request basically to get the same
class :).

Is this known caching issue, or do you have any other solution for me?

Thanks for help,
Michal

<map:pipelines>
  <map:pipeline>   
    <!-- Source aggregation -->
    <map:match pattern="*/*.source">
      <map:generate type="file" src="{1}/{2}.xml"/>
      <map:transform type="xslt-saxon" src="xinclude/x2cinclude.xsl"/>
      <map:transform type="cinclude"/>
      <map:serialize type="xml"/>
    </map:match>

    <!-- Serverpages -->
    <map:match pattern="**.xml">
      <map:act type="xsp-action" src="actions/check-session-action.xsp">

        <map:match pattern="main/*.xml">
          <map:generate type="serverpages" src="cocoon:/main/{1}.source"/>
          <map:transform type="xslt-saxon" src="main/{1}.xsl"/>
          <map:serialize type="html"/>
        </map:match>

        <!-- Informacie  -->
        <map:match pattern="banks2/*.xml">
          <map:generate type="serverpages" src="cocoon:/banks2/{1}.source"/>
          <map:transform type="xslt-saxon" src="banks2/{1}.xsl"/>
          <map:serialize type="html"/>
        </map:match>

      </map:act>
      <map:redirect-to uri="fu.htmll"/>
    </map:match>
    
  </map:pipeline>
</map:pipelines>



> -----Original Message-----
> From: Timothy Larson [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, December 18, 2002 2:48 PM
> To: [EMAIL PROTECTED]
> Subject: RE: Source aggregation by XInclude
> 
> 
> You coulde try the caching version of the cinclude 
> transformer in place of the non-caching xinclude transformer.
> See 
> http://xml.apache.org/cocoon/userdocs/transformers/cinclude-tr
ansformer.html
> The only problem I see is that the cinclude transformer does 
> not seem to have the xpath features
> that the xinclude transformer has.
> 
> Tim
> 
> >>> [EMAIL PROTECTED] 12/18/02 07:16AM >>>
> >Thank you,
> >but now my xsp pages get recompiled to Java every time. 
> Probably it is the
> >issue of xinclude. 
> >Can anyone help me how to tell cocoon not to recompile 
> some_page.xsp every
> >time I acces the page?
> >Does it exist any explicit mechanism how to cache the output of the
> >pipeline?
> >
> >I am using this xsp preprocesing pipeline:
> >  <map:match pattern="some_page.xsp">
> >    <map:generate src="some_file.xml"/>
> >    <map:transform type="xinclude"/>
> >    <map:serialize type="xml"/>
> >  </map:match>
> >
> >  <map:match pattern="some_page.html">
> >    <map:generate src="cocoon:/some_page.xsp" type="serverpages"/>
> >    <map:transform src="some_other_stylesheet.xsl"/>
> >    <map:serialize type="xml"/>
> >  </map:match>
> >
> >Cocoon 2.0.3.
> >
> >Thanks for help.
> >Michal
> 
> 
> 
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
> 
> To unsubscribe, e-mail:     <[EMAIL PROTECTED]>
> For additional commands, e-mail:   <[EMAIL PROTECTED]>
> __________ Informacia od NOD32 1.337 (20021217) __________
> 
> Tato sprava bola preverena systemom NOD32 pre Exchange.
> http://www.eset.sk
> 
> 
> 
> 

---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>

Reply via email to