You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Replace hand-rolled Caffeine cache with TenantAwareCache in FioriRecommendationHandler #78
Tenant-scoping is done via manual composite string keys (tenantId + ":" + entityName), and model-change invalidation requires a dedicated RecommendationModelChangedHandler that listens for MODEL_CHANGED events.
This should be replaced with the framework-provided TenantAwareCache<T, CdsModel> from cds-services-utils, which:
Auto-resolves the tenant from RequestContext (no manual key construction).
Auto-invalidates when the CDS model changes via a WeakReference<CdsModel> validator - when extensibility deploys a new model for a tenant, the cache entry is recomputed on next access. This eliminates the need for RecommendationModelChangedHandler entirely.
Picks up standard cache configuration (cds.model.provider.cache.maxSize, cds.model.provider.cache.expirationTime) from application properties, giving operators control without code changes.
Follows the established pattern used throughout cds-services (e.g., InactiveHandler, DraftGCHandler, AuthorizationDefaultOnHandler).
Suggested approach:
Change the cache field to TenantAwareCache<Set<String>, CdsModel> where the Set<String> holds entity qualified names that have no prediction columns for that tenant.
Use ConcurrentHashMap::newKeySet as the value supplier (thread-safe mutable set per tenant).
Delete RecommendationModelChangedHandler and its registration in RecommendationConfiguration.
Activity
github-actions commentedon Jun 17, 2026
👋 Hello @Schmarvinius, thank you for submitting this issue. Our team is reviewing your report and will follow up with you as soon as possible.