@Override
                public void completed(final Map<String, T> storageObjectMap) {
                    try {
                        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());
                                }
                            }
                        }
                        callback.completed(resultMap);
                    } catch (final Exception ex) {
                        callback.failed(ex);
                    }
                }
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/AbstractSerializingAsyncCacheStorage.java