@Override
    public final Map<String, HttpCacheEntry> getEntries(final Collection<String> keys) throws ResourceIOException {
        Args.notNull(keys, "Storage keys");
        final List<String> storageKeys = new ArrayList<>(keys.size());
        for (final String key: keys) {
            storageKeys.add(digestToStorageKey(key));
        }
        final Map<String, T> storageObjectMap = bulkRestore(storageKeys);
        final Map<String, HttpCacheEntry> resultMap = new HashMap<>();
        for (final String key: keys) {
            final String storageKey = digestToStorageKey(key);
            final T storageObject = storageObjectMap.get(storageKey);
            if (storageObject != null) {
                final HttpCacheStorageEntry entry = serializer.deserialize(storageObject);
                if (key.equals(entry.getKey())) {
                    resultMap.put(key, entry.getContent());
                }
            }
        }
        return resultMap;
    }
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