Skip to content

Cleanup cache handling

Daniel Gerhardt requested to merge cleanup-cache-handling into master

Removed explicit scheduled cache eviction handling because it is handled by the cache implementation (Caffeine), so this logic is obsolete and counterproductive.

Furthermore, refactored and fixed cache handling for statistics. The previous handling of cache eviction for statistics did not make much sense. The statistics were cached and the cached value retrieved and written to a field of the serivce in intervals. Furthermore, the statistics were evicted from cache for create and update events for some but not all entity types. In practise, this ment that statistics were stale until a room was created or deleted.

This has now been simplified. Instead of listening to CrudEvents, statistics are now always evicted from cache after 30 seconds. The cache eviction handling has been moved to the statistics service implementation.

The cache has been renamed from statistics to system to prepare its use for additional system values in the future.

Edited by Daniel Gerhardt

Merge request reports