Code example for ConcurrentHashMap

Methods: remove

0
        if(url == null){
            return; 
        } 
 
        // Remove from memory cache 
        memoryCache.remove(getCacheKey(url));
 
        // Remove from file cache 
        File f = new File(diskCachePath, getCacheKey(url));
        if(f.exists() && f.isFile()) {
            f.delete();
        } 
    } 
 
    public void clear() { 
        // Remove everything from memory cache 
        memoryCache.clear();
 
        // Remove everything from file cache 
        File cachedFileDir = new File(diskCachePath);
        if(cachedFileDir.exists() && cachedFileDir.isDirectory()) {