V getForClass(K forKey, Type forClass, Supplier<? extends V> supplierIfNotPresent) {
        return cache.compute(forKey, (key, current) -> {
            if (current == null || current.getLeft() != forClass) {
                // The key was not present, or the cache was invalidated.
                return Pair.of(forClass, supplierIfNotPresent.get());
            } else {
                return current;
            }
        }).getRight();
    }
Retrieves cached value for the key associated with the given Type,
computing the value to store if the key isn't present, or if the cache is
invalidated.

@param forKey The key of the cached value to retrieve.
@param forClass The Type that should be associated with the cached value.
@param supplierIfNotPresent Function to compute cached value.
@return Cached value.
smithy-model/src/main/java/software/amazon/smithy/model/node/IdentityClassCache.java