code: public CloseableReference<V> cache(final K key, final CloseableReference<V> valueRef) {
      return cache(key, valueRef, null);
    }
docs: 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