docs: private InternalCacheEntry<WrappedBytes, WrappedBytes> performPut(long bucketHeadAddress, long actualAddress,
           long newAddress, WrappedBytes key, boolean requireReturn) {
        // Have to start new linked node list
        if (bucketHeadAddress == 0) {
           memoryLookup.putMemoryAddress(key, newAddress);
           entryCreated(newAddress);
           size.incrementAndGet();
           return null;
        } else {
           boolean replaceHead = false;
           boolean foundPrevious = false;
           // Whether the key was found or not - short circuit equality checks
           InternalCacheEntry<WrappedBytes, WrappedBytes> previousValue = null;
           long address = bucketHeadAddress;
           // Holds the previous linked list address
           long prevAddress = 0;
           // Keep looping until we get the tail end - we always append the put to the end
           while (address != 0) {
              long nextAddress = offHeapEntryFactory.getNext(address);
              if (!foundPrevious) {
                 // If the actualAddress was not known check key equality otherwise just compare with the address
                 if (actualAddress == 0 ? offHeapEntryFactory.equalsKey(address, key) : actualAddress == address) {
                    foundPrevious = true;
                    if (requireReturn) {
                       previousValue = offHeapEntryFactory.fromMemory(address);
                    }
                    entryReplaced(newAddress, address);
                    // If this is true it means this was the first node in the linked list
                    if (prevAddress == 0) {
                       if (nextAddress == 0) {
                          // This branch is the case where our key is the only one in the linked list
                          replaceHead = true;
                       } else {
                          // This branch is the case where our key is the first with another after
                          memoryLookup.putMemoryAddress(key, nextAddress);
                       }
                    } else {
                       // This branch means our node was not the first, so we have to update the address before ours
                       // to the one we previously referenced
                       offHeapEntryFactory.setNext(prevAddress, nextAddress);
                       // We purposely don't update prevAddress, because we have to keep it as the current pointer
                       // since we removed ours
                       address = nextAddress;
                       continue;
                    }
                 }
              }
              prevAddress = address;
              address = nextAddress;
           }
           // If we didn't find the key previous, it means we are a new entry
           if (!foundPrevious) {
              entryCreated(newAddress);
              size.incrementAndGet();
           }
           if (replaceHead) {
              memoryLookup.putMemoryAddress(key, newAddress);
           } else {
              // Now prevAddress should be the last link so we fix our link
              offHeapEntryFactory.setNext(prevAddress, newAddress);
           }
           return previousValue;
        }
     }