You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Geoff Howard <co...@leverageweb.com> on 2003/10/01 04:17:21 UTC

Re: not working samples

Geoff Howard wrote:

> Joerg Heinicke wrote:

>> http://127.0.0.1:8888/samples/eventcache/
>> Does not work. Neither "uncache with action" (nothing happens) nor
>> "uncache with flow" (results in exception). This has nothing to do with
>> the switch from ComposerGenerator to SerializableGenerator I did a few
>> days ago. I didn't work before too. Must something be done before using
>> eventcache? As above the first link opens unnecessary (?) new windows.
> 
> Hmmm.  Well, you have to include the block in the build but that should 
> be it.  I haven't checked in the last week or so but this was always 
> working to my knowledge.  I'll check into it.

OK, I've discovered this was broken by a commit by [insert Release 
Manager's name here :P] before the 2.1.1 release.  The EventAware Cache 
was meant to be a Decorator around the normal CacheImpl and so was using 
its default role.  Carsten added configurable caches to map:pipe and 
modified this samples' sitemap but in the refactoring neither the sample 
flow nor the sample action which looked up the component in the sample 
was modified to use the new role.  I thought I had checked this after 
that point but apparently not as this would have been hard to miss.

I'm trying to fix it now but it doesn't seem that the cached responses 
are winding up in the configured cache (they're in the regular cache and 
aren't getting cleared).  If I get it working soon I'll commit it as a 
bug fix.  I don't think this can possibly affect anything else but if it 
does, just revert the change and blame [insert random committer's name 
here].

As a bonus to Joerg, I'm also getting rid of the new windows which 
really were annoying.

Geoff


Re: not working samples

Posted by Geoff Howard <co...@leverageweb.com>.
Geoff Howard wrote:

> Geoff Howard wrote:
> 
>> Joerg Heinicke wrote:
> 
> 
>>> http://127.0.0.1:8888/samples/eventcache/
>>> Does not work. Neither "uncache with action" (nothing happens) nor
>>> "uncache with flow" (results in exception). This has nothing to do with
>>> the switch from ComposerGenerator to SerializableGenerator I did a few
>>> days ago. I didn't work before too. Must something be done before using
>>> eventcache? As above the first link opens unnecessary (?) new windows.
>>
>>
>> Hmmm.  Well, you have to include the block in the build but that 
>> should be it.  I haven't checked in the last week or so but this was 
>> always working to my knowledge.  I'll check into it.
> 
> 
> OK, I've discovered this was broken by a commit by [insert Release 
> Manager's name here :P] before the 2.1.1 release.  The EventAware Cache 
> was meant to be a Decorator around the normal CacheImpl and so was using 
> its default role.  Carsten added configurable caches to map:pipe and 
> modified this samples' sitemap but in the refactoring neither the sample 
> flow nor the sample action which looked up the component in the sample 
> was modified to use the new role.  I thought I had checked this after 
> that point but apparently not as this would have been hard to miss.
> 
> I'm trying to fix it now but it doesn't seem that the cached responses 
> are winding up in the configured cache (they're in the regular cache and 
> aren't getting cleared).  If I get it working soon I'll commit it as a 
> bug fix.  I don't think this can possibly affect anything else but if it 
> does, just revert the change and blame [insert random committer's name 
> here].

No luck so far.  After fixing the roles as mentioned above, I find that 
my EventAwareCacheImpl is indeed now instantiated and returned to my 
other components.  I see the log entry:

DEBUG   (2003-09-30) 23:09.39:682   [sitemap] (/samples/eventcache/demo) 
PoolThread-4/BaseCachingProcessingPipeline: Using cache 
org.apache.cocoon.caching.Cache/EventAware

which should mean that the pipeline is using that component but I don't 
see the log events during EventAwareCacheImpl.store() only:
DEBUG   (2003-09-30) 23:09.53:071   [core.manager] 
(/samples/eventcache/demo) PoolThread-4/CacheImpl: Caching new response 
for 
PK_G-serverpages-file:/D:/workspace/cocoon-2.1/build/webapp/samples/eventcache/eventcache.xsp-one_T-xslt-file:/D:/workspace/cocoon-2.1/build/webapp/samples/stylesheets/dynamic-page2html.xsl;sitemapURI=demo;file=eventcache.xsp;servletPath=/samples/eventcache/demo;remove=demo;contextPath=_S-html-1
DEBUG   (2003-09-30) 23:09.53:071   [core.store.transient] 
(/samples/eventcache/demo) PoolThread-4/MRUMemoryStore: Holding object 
in memory:
DEBUG   (2003-09-30) 23:09.53:071   [core.store.transient] 
(/samples/eventcache/demo) PoolThread-4/MRUMemoryStore:   key:

which tells me that for some reason the Pipeline is not actually using 
the configured Cache.  Attached is the diff of what I've got now if 
anyone wants to try it out.

Geoff