Ejemplo n.º 1
0
        /// <inheritdoc />
        public override async Task SaveAsync(ICacheClient redis, CancellationToken cancellationToken)
        {
            if (redis == null)
            {
                throw new ArgumentNullException(nameof(redis));
            }

            await
            Task.WhenAll(
                redis.SetAddAsync <string>("mudpie::programs", this.DbRef),
                redis.AddAsync($"mudpie::program:{this.DbRef}", this),
                CacheManager.UpdateAsync(this.DbRef, redis, this, cancellationToken));
        }
Ejemplo n.º 2
0
        /// <inheritdoc />
        public override async Task SaveAsync(ICacheClient redis, CancellationToken cancellationToken)
        {
            if (redis == null)
            {
                throw new ArgumentNullException(nameof(redis));
            }

            // ReSharper disable PossibleNullReferenceException
            await Task.WhenAll(
                redis.SetAddAsync <string>("mudpie::things", this.DbRef),
                redis.AddAsync($"mudpie::thing:{this.DbRef}", this),
                CacheManager.UpdateAsync(this.DbRef, redis, this, cancellationToken));

            // ReSharper restore PossibleNullReferenceException
        }