private BinaryResource endInsert ( final DiskStorage . Inserter inserter , final CacheKey key , String resourceId ) throws IOException { synchronized ( mLock ) { BinaryResource resource = inserter . commit ( key ) ; mResourceIndex . add ( resourceId ) ; mCacheStats . increment ( resource . size ( ) , 1 ) ; return resource ; } }
Commits the provided temp file to the cache renaming it to match the cache s hashing convention .