public Task < Void > remove ( final CacheKey key ) { Preconditions . checkNotNull ( key ) ; mStagingArea . remove ( key ) ; try { return Task . call ( new Callable < Void > ( ) { @ Override public Void call ( ) throws Exception { try { if ( FrescoSystrace . isTracing ( ) ) { FrescoSystrace . beginSection ( "BufferedDiskCache#remove" ) ; } mStagingArea . remove ( key ) ; mFileCache . remove ( key ) ; } finally { if ( FrescoSystrace . isTracing ( ) ) { FrescoSystrace . endSection ( ) ; } } return null ; } } , mWriteExecutor ) ; } catch ( Exception exception ) { // Log failure // TODO: 3697790 FLog . w ( TAG , exception , "Failed to schedule disk-cache remove for %s" , key . getUriString ( ) ) ; return Task . forError ( exception ) ; } }
Removes the item from the disk cache and the staging area .