cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Crossley <cross...@apache.org>
Subject Re: questions on store usage
Date Mon, 20 Feb 2006 06:46:03 GMT
I am answering so as to keep the thread alive,
not because i know anything about stores.

Would someone who does know, please help Tim. 
Being a Forrest committer, when we get him over the
learning hump, he might be able to help fix various
Cocoon issues.

Tim Williams wrote:
> In forrest we've got an input module that currently has it's own
> simple hashmap-caching.  The assumption is that the right thing to do
> is move away from our homegrown-cache to use the cocoon store
> (TRANSIENT_STORE).

I presume that you are referring to the Locationmap.

The Cocoon LinkRewriterTransformer has a similar issue
http://issues.apache.org/jira/browse/COCOON-1574
"Memory Leak with XMLFileModule"

It has comments about needing to use the Cocoon cache.
Perhaps Ralph and Jörg can help.

>   In doing this, I've got some potentially dumb
> questions.

Nothing is dumb.

> Is the store somehow magically isolated or is it a global environment
> thing?  In other words do I need to prefix my keys with the input
> module name to attempt to attain uniqueness?

See a Cocoon status page and the Key id for various keys
in the current caches. Yes it needs to be unique.
http://cocoon.zones.apache.org/demos/release/samples/

There are docs at
"CacheableProcessingComponent Contracts"
http://cocoon.zones.apache.org/daisy/documentation/writing/corecontracts/675.html

"Performance Tips"
http://cocoon.apache.org/2.1/performancetips.html
... has some about the keys.

> Do I need to do anything on dispose() to explicitly clean out my
> stored items or assume it'll push them out if it needs to?

The store mechanism will take care of itself according to our
configuration. At Forrest we ae just using the default config
provided by Cocoon. Perhaps we need to tweak that.

Here is a reading list, in case you had missed some :-)
Not sure how up-to-date any of it is. Also Forrest
is using Cocoon-2.2 (prior to Mavenisation) so will be
different.

"Writing Cache Efficient Components"
http://cocoon.zones.apache.org/daisy/documentation/writing/690.html

"Cocoon Source Resolving - Store Components"
http://cocoon.apache.org/2.1/developing/stores.html

"Caching"
http://cocoon.apache.org/2.1/userdocs/concepts/caching.html

"StoreJanitor"
http://cocoon.apache.org/2.1/userdocs/concepts/storejanitor.html

-David

> Also, if you can think of anything that uses the store in this way
> that I could use as an example I'd appreciate it -- I've yet to find
> anything.
> 
> Thanks,
> --tim

Mime
View raw message