Hello, it does not make much sense to compare the stores on their logger configuration (core.store.transient could just have been foo.bar.log.me)
So, your actual question is, what is the difference between org.apache.cocoon.components.store.impl.DefaultTransientStore and org.apache.cocoon.components.store.impl.EHDefaultStore The DefaultTransientStore extends the MRUMemoryStore (org.apache.excalibur.store.impl.MRUMemoryStore) by thwrowing an exception when use-persistent-cache is set to "true". This makes sure, users never use a DefaultTransientStore for diskpersistent purposes (hence the name "transientStore"). Typically, your xsls are cached here. The DefaultTransientStore is especially useful for keeping non-serializable objects in memory (the maximum number of stored objects is defined by masobjects, default is 100). The EHDefaultStore is cocoon's default store for storing cached pipelines and sources. This is a net.sf.ehcache.Cache cache implementation. Everything that is stored in this cache must be serializable if you want to store it to disk (normally pipelines are ofcourse serializable, as well as sources). For the EHDefaultStore you have quite some tuning parameters -timeToIdleSeconds : after X seconds of no requests remove from cache -timeToLiveSeconds : After X seconds always removed (must be > timeToIdleSeconds if you want to use it. Best practice in my opinion is set it to 0 and only set timeToIdleSeconds.) -eternal : if set to true, the two above a disregarded -maxobjects : maximum number of cached items in memory (not the max number of keys held in memory!! It is the maximum number of stored values (objects) belonging to a key. The number of keys can grow much larger, see overflow-to-disk! ) -overflow-to-disk : default true. When maxobjects is reached, the values belonging to keys are stored to disk. Number of keys in memory can grow infinitely when overflow-to-disk is true. When it is false, maxobjects is also the maximum number of keys is memory. According the specified or default caching strategy keys are removed -diskpersistent: (only since a few days configurable http://issues.apache.org/jira/browse/COCOON-1868): When set to false, cache is not maintained between JVM shutdown and startup. Default true making cache persistent between startups. The parameters are important. If you don't configure your EHDefaultStore properly, and you store results that never can be reached again (like a cachekey with a current date in it, from some time ago), and you dont have configured timeToIdleSeconds or timeToLiveSeconds, you will always end up with a slowly (or fast) increasing memory usage, eventually leading to OOM. I typically set the configuration something like: <store logger="core.store"> <parameter name="maxobjects" value="3000"/> <parameter name="eternal" value="false"/> <parameter name="timeToLiveSeconds" value="0"/> <!-- 1 day --> <parameter name="timeToIdleSeconds" value="86400"/> <parameter name="overflow-to-disk" value="true"/> <parameter name="diskpersistent" value="true"/> </store> One last note: only since version 2.1.10 from the top of my head, the EHDefaultStore is configurable to use timeToIdleSeconds and timeToIdleSeconds, and only in trunk diskpersistent can be managed (before it was always true). Hope this clears things a little bit up (for everybody because http://wiki.apache.org/cocoon/StoreComponents seems to be not a really extensive elaboration on the cocoon caching.) Regards Ard -- Hippo Oosteinde 11 1017WT Amsterdam The Netherlands Tel +31 (0)20 5224466 ------------------------------------------------------------- [EMAIL PROTECTED] / http://www.hippo.nl -------------------------------------------------------------- Hello again, Looking at the cocoon.xconf file, I noticed that there are 2 different "store" mechanisms declared : <transient-store logger="core.store.transient"> <store logger="core.store"> It's not clear when each of them is used. Does core.store.transient store rely on core.store ? Beyond that, does use-persistent-cache parameter default to "true" or "false" ? Thanks --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
