cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Reinhard Poetz <reinh...@apache.org>
Subject CachedSource persistence
Date Wed, 17 Nov 2004 13:51:28 GMT

I've successfully set up a cached source that refreshes every 60 seconds. If the
source isn't reachable after the 60 seconds the old but cached version is used. 
This works fine if org.apache.cocoon.caching.impl.CacheImpl is used as Cache 
implementation. But this solution doesn't survive a server restart and so I 
switched to org.apache.cocoon.caching.SimpleCache:

Here my cocoon.xconf entries:

     <component-instance name="cached"
                         class="a.o.c.c.source.impl.CachingSourceFactory"
                         logger="core.source.cached">
       <parameter name="async" value="true"/>
       <parameter name="cache-role" value="o.a.c.caching.Cache/Simple"/>
       <parameter name="refresher-role"
                   value="o.a.c.c.source.impl.Refresher/Delay"/>
       <parameter name="default-expires" value="-1"/>
     </component-instance>

   <component role="org.apache.cocoon.caching.Cache/Simple"
              class="org.apache.cocoon.caching.SimpleCache"
              logger="core.refresher.update">
    <parameter name="baseDirectory" value="rsscontent"></parameter>
   </component>

Sitemap:
         <map:generate 
src="cached:http://www.theserverside.com/rss/theserverside-rss2.xml?cocoon:cache-expires=10"/>

Using the SimpleCache I excpected that the content of the source is stored in 
the directory "rsscontent". But nothing shows up - nothing is cached at all. 
After pulling the network plug I get an exception at once.

Any ideas what could be wrong here?

BTW, I'm using Cocoon 2.1.5.1 for this.

-- 
Reinhard


Mime
View raw message