public Task SetAsync(string key, byte[] value, DistributedCacheEntryOptions options, CancellationToken token = default) { var item = new CachedItem(_partitionKey, key, value); var op = TableOperation.InsertOrReplace(item); return(_table.ExecuteAsync(op)); }
public async Task RemoveAsync(string key, CancellationToken token = default) { var item = new CachedItem(_partitionKey, key); item.ETag = "*"; var op = TableOperation.Delete(item); try { await _table.ExecuteAsync(op); } catch (StorageException) { // Object probably wasn't in cache } }