public synchronized void put ( final CacheKey key , final EncodedImage encodedImage ) { Preconditions . checkNotNull ( key ) ; Preconditions . checkArgument ( EncodedImage . isValid ( encodedImage ) ) ; // we're making a 'copy' of this reference - so duplicate it final EncodedImage oldEntry = mMap . put ( key , EncodedImage . cloneOrNull ( encodedImage ) ) ; EncodedImage . closeSafely ( oldEntry ) ; logStats ( ) ; }
Stores key - value in this StagingArea . This call overrides previous value of stored reference if