question: public void initDiskCache ( ) { if ( DEBUG ) { Log . d ( TAG , "initDiskCache " + this ) ; } synchronized ( mDiskCacheLock ) { if ( mDiskLruCache == null || mDiskLruCache . isClosed ( ) ) { if ( mDiskCacheDir != null ) { if ( ! mDiskCacheDir . exists ( ) ) { mDiskCacheDir . mkdirs ( ) ; } try { mDiskLruCache = DiskLruCache . open ( mDiskCacheDir , 1 , 1 , mDiskCacheSize ) ; if ( DEBUG ) { Log . d ( TAG , "Disk cache initialized " + this ) ; } } catch ( final IOException e ) { Log . e ( TAG , "initDiskCache - " + e ) ; } } } mDiskCacheStarting = false ; mDiskCacheReady = true ; mDiskCacheLock . notifyAll ( ) ; } }
target:  Initializes the disk cache. Note that this includes disk access so this should not be executed on the main/UI thread. By default an ImageProvider does not initialize the disk cache when it is created, instead you should call initDiskCache() to initialize it on a background thread.