CacheMonitorState cacheState = cacheMonitor.snapshotStatistics(PREFERENCES); Map<String,Long> preferences = new HashMap<>(); preferences.put("hits", cacheState.getCacheHits()); caches.put("Preferences", preferences); cacheState = cacheMonitor.snapshotStatistics(PORTLET_DEFINITION_NAME); Map<String,Long> portlet = new HashMap<>(); portlet.put("hits", cacheState.getCacheHits()); caches.put("Portlets", portlet); cacheState = cacheMonitor.snapshotStatistics(PORTLET_APPLICATION_NAME); Map<String,Long> portletApp = new HashMap<>(); portletApp.put("hits", cacheState.getCacheHits()); caches.put("PortletApps", portletApp); CacheMonitorState fileState = cacheMonitor.snapshotStatistics(PAGE_FILE); Map<String,Long> pageFile = new HashMap<>(); if (fileState.getMemoryStoreSize() > 0) { CacheMonitorState pathState = cacheMonitor.snapshotStatistics(PAGE_MANAGER_PATH); pageFile.put("hits", pathState.getCacheHits()); pageFile.put("misses", pathState.getCacheMisses());