Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public async Task SetAsync(string key, byte[] value, DistributedCacheEntryOptions options,
- CancellationToken token = default(CancellationToken))
- {
- var uri = UriFactory
- .CreateDocumentCollectionUri(_options.DatabaseName, _options.CollectionName);
- var document = CosmosDbCacheItem.Build(
- key,
- (int)options.AbsoluteExpirationRelativeToNow.Value.TotalSeconds,
- value);
- await _client.UpsertDocumentAsync(uri, document);
- }
Add Comment
Please, Sign In to add comment