Project

General

Profile

bug #10214

Updated by Andreas Müller over 1 year ago

This results in short time-to-live and time-to-idle values (and maybe others) as values are taken from default ehCache configuration instead of cdm EhCacheConfiguration and has 2 min instead of 2 h. 

 The reason is that currently the class EhCacheConfiguration in method cacheManager() calls CacheManager.create(config). However, if the CacheManager singleton has already been created previously the passed configuration parameter has no effect. 

 If CacheManager.create() is called a singleton with a default cache configuration is created. This configuration can not be exchanged anymore later. 

 In TaxEditor the CacheManager singleton is already created when CdmRemoteCacheManager is initialized (contructor line 65) which is prior to calling CdmCacherBase.getDefaultCacheConfiguration(). 

 CdmTransientEntityCache: the transient entity cache works already correctly as it creates a cache with a given configuration in its constructor 

 Solutions: 

   * do not use the CacheManager singleton (but be careful to be thread safe) => no real reason for doing so 
   * use a specific cache configuration when the cdmDefaultCache is created (this seems to happen in CdmCacherBase.getDefaultCache()) => chosen solution, similar to transient entity cache 
   * ...  

 NOTE: do also adapt path to taxeditor ehcache in DiskStoreConfiguration of setUpCacheManager() configuration after the above is fixed => moved to #10218

Back