Hi,
I changed the subject because with the old one (org.apache.excalibur.store.impl.MRUMemoryStore) I didn't get any response :-( Vadim any comments?
I still had your original email in the inbox...
Volker
Hi,
org.apache.excalibur.store.impl.MRUMemoryStore should lookup "Store.PERSISTENT_STORE" only if "use-persistent-cache" (m_persistent) is true, instead you allways need to configure a persistent store if you use MRUMemoryStore.
Sound like you are right.
MRUMemoryStore internal uses a HashMap and a LinkedList. This implementation doesn't scale very well. My proposal is using org.apache.commons.collections.LRUMap instead which will improve performance.
IIRC, LRUMap is not suitable for multithreaded environment.
Some time ago Vadim has committed MRUMemoryStore into the deprecated block of cocoon (package org.apache.cocoon.components.store). This scales much better in multithreaded environments because the methods aren't synchronized anymore. Internal a "org.apache.cocoon.util.MRUBucketMap" is used.
Moreover, in addition to this, it uses twice less objects to do it's job: it combines HashMap together with List, thus it has only one internal MRUBucketMap.Entry object instead of two of them (HashMap.Entry and List.Entry) per entry.
So my question is, why don't we use this implementation, to make Cocoon more scalable? ;-)
You can. Have you tried it yet?
Vadim