public async Task DeleteKeyAsync_should_remove_key_from_cache() { Guid keyId = Guid.NewGuid(); await _sut.CreateKeyAsync(keyId.ToString()); Assert.Equal(1, GetCacheCount()); await _sut.DeleteKeyAsync(keyId.ToString()); Assert.Equal(0, GetCacheCount()); }
public async Task DeleteKeyAsync(string keyId) { await _keystore.DeleteKeyAsync(keyId); try { await _cache.RemoveAsync(keyId); } catch (Exception) { } }