/** * This method will remove the key from lru cache * * @param key */ private void removeKey(String key) { Cacheable cacheable = lruCacheMap.get(key); if (null != cacheable) { long memorySize = cacheable.getMemorySize(); cacheable.invalidate(); lruCacheMap.remove(key); currentSize = currentSize - memorySize; LOGGER.info("Removed entry from InMemory lru cache :: " + key); } }