PluginSessionCache extends AbstractReportContentCache { @Override public void cleanup() { getBackend().purge( Collections.singletonList( SEGMENT ) ); } PluginSessionCache( final ICacheBackend backend );  PluginSessionCache(); @Override void cleanup(); @Override void cleanupCurrentSession();  }
@Test public void testCleanup() throws Exception { final StandaloneSession session = new StandaloneSession( "test", "100500" ); PentahoSessionHolder.setSession( session ); final IReportContentCache cache = new PluginSessionCache( fileSystemCacheBackend ); cache.put( SOME_KEY, SOME_VALUE ); assertNotNull( cache.get( SOME_KEY ) ); cache.cleanup(); assertNull( cache.get( SOME_KEY ) ); }