From 32793d4e9772de03e7471d669a8bd21cd93935c0 Mon Sep 17 00:00:00 2001 From: Tim Kafalas tkafalas Date: Tue, 30 Jan 2024 11:52:19 -0500 Subject: [PATCH] [BACKLOG-39705] Remove from Region Cache not removing 1st level cache entry. --- .../pentaho/platform/plugin/services/cache/CacheManager.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/extensions/src/main/java/org/pentaho/platform/plugin/services/cache/CacheManager.java b/extensions/src/main/java/org/pentaho/platform/plugin/services/cache/CacheManager.java index 2d7b3ce1422..c6ed084853b 100644 --- a/extensions/src/main/java/org/pentaho/platform/plugin/services/cache/CacheManager.java +++ b/extensions/src/main/java/org/pentaho/platform/plugin/services/cache/CacheManager.java @@ -400,7 +400,10 @@ public Set getAllEntriesFromRegionCache( String region ) { public void removeFromRegionCache( String region, Object key ) { if ( checkRegionEnabled( region ) ) { HvCache hvcache = (HvCache) regionCache.get( region ); - hvcache.evictEntityData( (String) key ); + try ( SessionImpl session = (SessionImpl) hvcache.getSessionFactory().openSession() ) { + hvcache.getStorageAccess().removeFromCache( key, session ); + hvcache.evictEntityData( (String) key ); + } } else { CacheManager.logger.warn( Messages.getInstance().getString( "CacheManager.WARN_0003_REGION_DOES_NOT_EXIST", region ) ); //$NON-NLS-1$