Exemplo n.º 1
0
        /// <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);
        }
Exemplo n.º 2
0
 /// <inheritdoc/>
 public void Set(string key, byte[] value, DistributedCacheEntryOptions options)
 {
     FusioCacheChaosUtils.MaybeChaos(ChaosMinDelay, ChaosMaxDelay, ChaosThrowProbability);
     _innerCache.Set(key, value, options);
 }
Exemplo n.º 3
0
 /// <inheritdoc/>
 public void Remove(string key)
 {
     FusioCacheChaosUtils.MaybeChaos(ChaosMinDelay, ChaosMaxDelay, ChaosThrowProbability);
     _innerCache.Remove(key);
 }
Exemplo n.º 4
0
        /// <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);
        }
Exemplo n.º 5
0
 /// <inheritdoc/>
 public byte[] Get(string key)
 {
     FusioCacheChaosUtils.MaybeChaos(ChaosMinDelay, ChaosMaxDelay, ChaosThrowProbability);
     return(_innerCache.Get(key));
 }