public @Nullable CloseableReference<V> cache(final K key, final CloseableReference<V> valueRef) {
    return cache(key, valueRef, null);
  }
Caches the given key-value pair.

<p>Important: the client should use the returned reference instead of the original one. It is
the caller's responsibility to close the returned reference once not needed anymore.

@return the new reference to be used, null if the value cannot be cached
imagepipeline-base/src/main/java/com/facebook/imagepipeline/cache/AbstractAdaptiveCountingMemoryCache.java