MVCCEntry mvccEntry;
if (cacheEntry != null && cacheEntry.isNull()) cacheEntry = null;
Metadata providedMetadata = extractMetadata(cmd);
if (cacheEntry != null) {
mvccEntry = wrapMvccEntryForPut(ctx, key, cacheEntry, providedMetadata);
mvccEntry.undelete(undeleteIfNeeded);
} else {
InternalCacheEntry ice = (icEntry == null ? getFromContainer(key) : icEntry);
// A putForExternalRead is putIfAbsent, so if key present, do nothing
if (ice != null && cmd.hasFlag(Flag.PUT_FOR_EXTERNAL_READ)) {
// make sure we record this! Null value since this is a forced lock on the key