public async Task <ContainerDocumentCacheEntry <T> > SetAsync <T>(string key, ContainerDocumentCacheEntry <T> value, ContainerDocumentCacheEntryOptions options, CancellationToken token) where T : class, IContainerDocument, new() { var json = ContainerDocumentCacheEntry <T> .Serialize(value); await cache .SetStringAsync(key, json, options, token) .ConfigureAwait(false); return(value); }