public void clearCache(){
  if (mMemoryCache != null) {
    mMemoryCache.evictAll();
    if (BuildConfig.DEBUG) {
      Log.d(TAG,"Memory cache cleared");
    }
  }
synchronized (mDiskCacheLock) {
    mDiskCacheStarting=true;
    if (mDiskLruCache != null && !mDiskLruCache.isClosed()) {
      try {
        mDiskLruCache.delete();
        if (BuildConfig.DEBUG) {
          Log.d(TAG,"Disk cache cleared");
        }
      }
 catch (      IOException e) {
        Log.e(TAG,"clearCache - " + e);
      }
      mDiskLruCache=null;
      initDiskCache();
    }
  }
}

public void clearCache ( ) { if ( mMemoryCache != null ) { mMemoryCache . evictAll ( ) ; if ( BuildConfig . DEBUG ) { Log . d ( TAG , "Memory cache cleared" ) ; } } synchronized ( mDiskCacheLock ) { mDiskCacheStarting = true ; if ( mDiskLruCache != null && ! mDiskLruCache . isClosed ( ) ) { try { mDiskLruCache . delete ( ) ; if ( BuildConfig . DEBUG ) { Log . d ( TAG , "Disk cache cleared" ) ; } } catch ( IOException e ) { Log . e ( TAG , "clearCache - " + e ) ; } mDiskLruCache = null ; initDiskCache ( ) ; } } }
clears both the memory and disk cache associated with this imagecache object . note that this includes disk access so this should not be executed on the main / ui thread .
