// no cache hit
FeatureState featureState = delegate.getFeatureState(feature);
// cache the result (may be null)
cache.put(feature.name(), new CacheEntry(featureState != null ? featureState.copy() : null));
// return the result
return featureState;
}