This caches up to 1000 documents in memory indefinitely, which could be result in significant memory use.
In practice, documents don't need to be cached. The maxElementsInMemory should be set to 0.
Environment
None
Activity
Tim Anderson October 17, 2014 at 4:15 AM
I've disabled caching of documents by removing <cache usage="read-write"/> from the DocumentDOImpl.hbm.xml hibernate mapping file.
Note that the semantics of maxElementsInMemory in ehcache.xml is different in the version we are using (1.7.2) and the latest release. In our version, maxElementsInMemory="0" means zero elements, whereas from 2.0 upwards it means unlimited (https://jira.terracotta.org/jira/browse/EHC-610 )
The EhCache configuration ehcache.xml includes the following:
<cache name="org.openvpms.component.business.dao.hibernate.im.document.DocumentDOImpl" maxElementsInMemory="1000" eternal="true" overflowToDisk="false"/>
This caches up to 1000 documents in memory indefinitely, which could be result in significant memory use.
In practice, documents don't need to be cached. The maxElementsInMemory should be set to 0.