Project

General

Profile

Actions

bug #10214

closed

Cache configuration for term cache not correctly initialized in taxeditor

Added by Andreas Müller over 1 year ago. Updated 7 months ago.

Status:
Closed
Priority:
Highest
Category:
taxeditor
Target version:
Start date:
Due date:
% Done:

70%

Estimated time:
Severity:
normal
Found in Version:
Tags:

Description

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


Related issues

Related to EDIT - bug #10186: Problems with session handling in taxeditorClosedKatja Luther

Actions
Related to EDIT - task #10077: upgrade ehcache to 3.xNewAndreas Müller

Actions
Related to EDIT - task #10218: Unify cache handling in CDM platformNewAndreas Müller

Actions
Actions

Also available in: Atom PDF