Code example for LruCache

Methods: evictAll

0
    /** 
     * Clears the memory cache associated with this ImageCache object. 
     */ 
    public void clearCache() { 
        if (mMemoryCache != null) {
            mMemoryCache.evictAll();
            Log.d(TAG, "Memory cache cleared");
        } 
    } 
 
    /** 
     * A holder class that contains cache parameters. 
     */ 
    public static class ImageCacheParams { 
        public int memCacheSize = DEFAULT_MEM_CACHE_SIZE;
        public boolean memoryCacheEnabled = DEFAULT_MEM_CACHE_ENABLED;
 
        /** 
         * Create a set of image cache parameters that can be provided to 
         * {@link ImageCache#getInstance(FragmentManager, ImageCacheParams)} or 
         * {@link ImageWorker#addImageCache(FragmentManager, ImageCacheParams)}.