@Override
    public final Cancellable putEntry(
            final String key, final HttpCacheEntry entry, final FutureCallback<Boolean> callback) {
        Args.notNull(key, "Storage key");
        Args.notNull(callback, "Callback");
        try {
            final String storageKey = digestToStorageKey(key);
            final T storageObject = serializer.serialize(new HttpCacheStorageEntry(key, entry));
            return store(storageKey, storageObject, callback);
        } catch (final Exception ex) {
            callback.failed(ex);
            return Operations.nonCancellable();
        }
    }
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