for (; ; ) {
VersionedValue<V> versioned = cache.getWithMetadata(key);
if (versioned != null)
V newValue = f(key);
if (cache.putIfAbsent(key, newValue))
}
(idea
computeIfAbsent(userId, Function<K, V> f)
getOrLock
If locked > v = f() then putAndUnlock(userId, v)