Cleanup cache handling
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 CrudEvent
s,
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.