Reinhard Poetz napisaƂ(a):

As discusses with Ard and Peter (http://marc.info/?t=117563247800004&r=1&w=2), I patched EHDefaultStore and MRUMemoryStore:

<action dev="reinhard" type="fix">
MRUMemoryStore registers at StoreJanitor only in that case, if StoreJanitor
is set as dependency. Assuming that in many cases the MRUMemoryStore is
used for often requested resources like compiled XSLTTemplates or i18n resource bundles,
it doesn't make sense to remove them as most probably they will be added
within one of the next requests hiting Cocoon. Find more information
at http://marc.info/?t=117563247800004&amp;r=1&amp;w=2.
</action>
<action dev="reinhard" type="add">
Expose all configuration properties that EHCache provides via setter methods.
Using them, EHDefaultStore can be completly configured in the Spring bean
definition. This allows setting maxElementsInMemory, memoryStoreEvictionPolicy, overflowToDisk, diskStorePath, eternal, timeToLiveSeconds, timeToIdleSeconds, diskPersistent, diskExpiryThreadIntervalSeconds, registeredEventListeners,
bootstrapCacheLoader, maxElementsOnDisk. See the 1.2.4 constructor at
http://ehcache.sourceforge.net/javadoc/net/sf/ehcache/Cache.html for
details.
</action>
<action dev="reinhard" type="fix">
EHDefaultStore doesn't register at StoreJanitor anymore. The usage of
StoreJanitor to remove elements from EHDefaultStore was contra-productive,
because EHCache provides its own invalidation mechanisms which are more
sophisticated than the removal of random items. Find more information
at http://marc.info/?t=117563247800004&amp;r=1&amp;w=2.
</action>
<action dev="reinhard" type="update">
Make the maximum number of disk objects configureable. The default value
is 50000.
</action>


Thanks Reinhard for doing this. I have only basic understanding of Cocoon's caching so cannot comment. My dream would be to have: a) sensible defaults that cover most usage patterns of Cocoon for small and medium sites that cause making mistakes a lot more difficult
b) documentation explaining how this works and some tips on configuration

Yes Ard, Vadim, Reinhard and others, I look at you, can you help with these points as you seem quite experienced with Cocoon's caching? :)

--
Grzegorz Kossakowski

Reply via email to