Project

General

Profile

Actions

bug #10214

open

Cache configuration for term cache not correctly initialized in taxeditor

Added by Andreas Müller about 2 months ago. Updated about 1 month ago.

Status:
Resolved
Priority:
Highest
Assignee:
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 #1

Updated by Andreas Müller about 2 months ago

  • Related to bug #10186: Problems with session handling in taxeditor added
Actions #2

Updated by Andreas Müller about 2 months ago

Also it is unclear why single instances of CdmServiceCachingProxy to all use the static DEFAULT_CACHE_NAME from the base class. There might be only 1 such cache but still this is very dirty.

Actions #3

Updated by Andreas Müller about 2 months ago

  • Description updated (diff)
Actions #4

Updated by Andreas Müller about 1 month ago

Actions #5

Updated by Andreas Müller about 1 month ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 10
Actions #6

Updated by Andreas Müller about 1 month ago

  • Status changed from In Progress to Feedback

This should still be handled in current target version.

Actions #7

Updated by Andreas Müller about 1 month ago

  • Related to task #10218: Unify cache handling in CDM platform added
Actions #8

Updated by Andreas Müller about 1 month ago

  • Subject changed from Cache configuration not handled correctly in taxeditor to Cache configuration for term cache not correctly in taxeditor
Actions #9

Updated by Andreas Müller about 1 month ago

  • Status changed from Feedback to Resolved
  • % Done changed from 10 to 70
Actions #10

Updated by Andreas Müller about 1 month ago

  • Description updated (diff)
  • Assignee changed from Andreas Müller to Katja Luther
  • Priority changed from New to Highest

This should be fixed. Please review.

The most important result should be, that terms are not loaded anymore when changing focus e.g. in Taxon Editor. Only after 2h they should be reloaded. However, we should check that there are no side effects introduced by the change.

Actions #11

Updated by Andreas Müller about 1 month ago

  • Description updated (diff)
Actions #12

Updated by Andreas Müller about 1 month ago

  • Description updated (diff)
Actions #13

Updated by Katja Luther about 1 month ago

Andreas Müller wrote in #note-10:

This should be fixed. Please review.

The most important result should be, that terms are not loaded anymore when changing focus e.g. in Taxon Editor. Only after 2h they should be reloaded. However, we should check that there are no side effects introduced by the change.

This works fine, actually could not test yet, what happens after two hours.

Actions #14

Updated by Andreas Müller about 1 month ago

Katja Luther wrote in #note-13:

Andreas Müller wrote in #note-10:

This should be fixed. Please review.

The most important result should be, that terms are not loaded anymore when changing focus e.g. in Taxon Editor. Only after 2h they should be reloaded. However, we should check that there are no side effects introduced by the change.

This works fine, actually could not test yet, what happens after two hours.

I checke with an open-over-night instance and for some reason it did not reload. I check now with an adapted time (15s) in CdmPermanentCacheBase.getPermanentCacheConfiguration()

Actions #15

Updated by Andreas Müller about 1 month ago

  • Status changed from Resolved to Feedback
  • Assignee changed from Katja Luther to Andreas Müller

Ahh, the reason is that CdmServiceCachingProxy overrides the CdmPermanentCache configuration

Actions #16

Updated by Andreas Müller about 1 month ago

  • Status changed from Feedback to Resolved
Actions #17

Updated by Andreas Müller about 1 month ago

  • Assignee changed from Andreas Müller to Katja Luther

Now it should reload after 20min (if idle) or 1h (if not idle). Maybe you can test a last time. But it should work as expected.

Actions #18

Updated by Andreas Müller about 1 month ago

  • Subject changed from Cache configuration for term cache not correctly in taxeditor to Cache configuration for term cache not correctly initialized in taxeditor
Actions

Also available in: Atom PDF