/// <inheritdoc/> public async Task SetAsync(string key, byte[] value, DistributedCacheEntryOptions options, CancellationToken token = default) { await FusioCacheChaosUtils.MaybeChaosAsync(ChaosMinDelay, ChaosMaxDelay, ChaosThrowProbability).ConfigureAwait(false); await _innerCache.SetAsync(key, value, options, token).ConfigureAwait(false); }
/// <inheritdoc/> public void Set(string key, byte[] value, DistributedCacheEntryOptions options) { FusioCacheChaosUtils.MaybeChaos(ChaosMinDelay, ChaosMaxDelay, ChaosThrowProbability); _innerCache.Set(key, value, options); }
/// <inheritdoc/> public void Remove(string key) { FusioCacheChaosUtils.MaybeChaos(ChaosMinDelay, ChaosMaxDelay, ChaosThrowProbability); _innerCache.Remove(key); }
/// <inheritdoc/> public async Task RemoveAsync(string key, CancellationToken token = default) { await FusioCacheChaosUtils.MaybeChaosAsync(ChaosMinDelay, ChaosMaxDelay, ChaosThrowProbability).ConfigureAwait(false); await _innerCache.RemoveAsync(key, token).ConfigureAwait(false); }
/// <inheritdoc/> public byte[] Get(string key) { FusioCacheChaosUtils.MaybeChaos(ChaosMinDelay, ChaosMaxDelay, ChaosThrowProbability); return(_innerCache.Get(key)); }