@Override
    public final HttpCacheEntry getEntry(final String key) throws ResourceIOException {
        final String storageKey = digestToStorageKey(key);
        final T storageObject = restore(storageKey);
        if (storageObject == null) {
            return null;
        }
        final HttpCacheStorageEntry entry = serializer.deserialize(storageObject);
        if (key.equals(entry.getKey())) {
            return entry.getContent();
        }
        return null;
    }
Abstract cache backend for serialized objects capable of CAS (compare-and-swap) updates.

@since 5.0
httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/AbstractSerializingCacheStorage.java