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.
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 to bug #10186: Problems with session handling in taxeditor added
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.
- Description updated (diff)
- Status changed from New to In Progress
- % Done changed from 0 to 10
- Status changed from In Progress to Feedback
This should still be handled in current target version.
- Related to task #10218: Unify cache handling in CDM platform added
- Subject changed from Cache configuration not handled correctly in taxeditor to Cache configuration for term cache not correctly in taxeditor
- Status changed from Feedback to Resolved
- % Done changed from 10 to 70
- 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.
- Description updated (diff)
- Description updated (diff)
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.
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()
- 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
- Status changed from Feedback to Resolved
- 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.
- Subject changed from Cache configuration for term cache not correctly in taxeditor to Cache configuration for term cache not correctly initialized in taxeditor
- Status changed from Resolved to Closed
- Assignee changed from Katja Luther to Andreas Müller
I tested it with an idle editor and after this time terms will be reloaded, terms already reloaded are not loaded again, so I think it works as expected.
Also available in: Atom
PDF