Revision 71477484
Added by Andreas Müller over 1 year ago
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/api/cache/CdmServiceCachingProxy.java | ||
---|---|---|
28 | 28 |
import eu.etaxonomy.taxeditor.session.ICdmEntitySession; |
29 | 29 |
import eu.etaxonomy.taxeditor.session.ICdmEntitySessionManager; |
30 | 30 |
import eu.etaxonomy.taxeditor.session.ICdmEntitySessionManagerObserver; |
31 |
import net.sf.ehcache.CacheManager; |
|
31 | 32 |
import net.sf.ehcache.config.CacheConfiguration; |
32 | 33 |
import net.sf.ehcache.config.DiskStoreConfiguration; |
33 | 34 |
import net.sf.ehcache.config.SizeOfPolicyConfiguration; |
... | ... | |
70 | 71 |
|
71 | 72 |
private void setUpCacheManager() { |
72 | 73 |
|
73 |
EhCacheConfiguration cacheConfig = new EhCacheConfiguration(); |
|
74 |
|
|
75 | 74 |
DiskStoreConfiguration diskStoreConfiguration = new DiskStoreConfiguration(); |
76 | 75 |
File ehcacheFolder = null; |
77 | 76 |
if(configFileUtil != null){ |
... | ... | |
85 | 84 |
ehcacheFolder = ConfigFileUtil.getCdmHomeSubDirFallback("taxeditor-ehcache"); |
86 | 85 |
} |
87 | 86 |
|
88 |
// FIXME use subfolder per taxeditor version to allow running multiple installations in parallel |
|
87 |
// FIXME use subfolder per taxeditor version to allow running multiple |
|
88 |
// installations in parallel |
|
89 | 89 |
// String taxEditorVersion = ..; |
90 | 90 |
// File ehcacheFolder = new File(ehcacheFolder, taxEditorVersion); |
91 | 91 |
diskStoreConfiguration.setPath(ehcacheFolder.getAbsolutePath()); |
92 | 92 |
|
93 |
EhCacheConfiguration cacheConfig = new EhCacheConfiguration(); |
|
93 | 94 |
cacheConfig.setDiskStoreConfiguration(diskStoreConfiguration); |
94 |
setCacheManager(cacheConfig.cacheManager()); |
|
95 |
CacheManager cacheManager = cacheConfig.cacheManager(); |
|
96 |
setCacheManager(cacheManager); |
|
95 | 97 |
} |
96 | 98 |
|
97 | 99 |
@Override |
Also available in: Unified diff
cleanup