cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From macie...@tiger.com.pl
Subject CachingCIncludeTransformer
Date Wed, 04 Jul 2001 15:43:46 GMT
I am attaching code of CachingCIncludeTransformer, IncludeCacheValidity and xml
files to try it.

Is just a try to attack problem of caching cinclude transformer. Current 
caching framework design hardly makes it possible. One has to use CacheValidity
objects in a hacky way.

As ContentAggregator it caches only if includes are files, since sitemap 
sources always return getLastModified() == 0.

Anyone works on caching sitemap includes in ContentAggregator?

P.S.:
To try it one should change 

<map:transformer 
    name="cinclude"
    src="org.apache.cocoon.transformation.CIncludeTransformer"/>

to

<map:transformer 
    name="cinclude"
    src="org.apache.cocoon.transformation.CachingCIncludeTransformer"/>

and add something like:

   <map:match pattern="x.xml">
     <map:generate src="x.xml"/>
     <map:transform type="cinclude"/>
     <map:serialize type="xml"/>       
   </map:match>

to sitemap.xmap and put x.xml, y.xml, z.xml into webapp dir.


Maciek Kaminski
maciejka@tiger.com.pl


Mime
View raw message