6 implementations of SetAsync
Microsoft.AspNetCore.Session.Tests (1)
SessionTests.cs (1)
1206public Task SetAsync(string key, byte[] value, DistributedCacheEntryOptions options, CancellationToken token = default)
Microsoft.Extensions.Caching.Hybrid.Tests (2)
L2Tests.cs (1)
265Task IDistributedCache.SetAsync(string key, byte[] value, DistributedCacheEntryOptions options, CancellationToken token)
StampedeTests.cs (1)
57Task IDistributedCache.SetAsync(string key, byte[] value, DistributedCacheEntryOptions options, CancellationToken token) => throw new NotSupportedException("Intentionally not provided");
Microsoft.Extensions.Caching.Memory (1)
MemoryDistributedCache.cs (1)
95public Task SetAsync(string key, byte[] value, DistributedCacheEntryOptions options, CancellationToken token = default(CancellationToken))
Microsoft.Extensions.Caching.SqlServer (1)
SqlServerCache.cs (1)
196public async Task SetAsync(
Microsoft.Extensions.Caching.StackExchangeRedis (1)
RedisCache.cs (1)
200public Task SetAsync(string key, byte[] value, DistributedCacheEntryOptions options, CancellationToken token = default)
42 references to SetAsync
Microsoft.AspNetCore.Mvc.TagHelpers (1)
Cache\DistributedCacheTagHelperStorage.cs (1)
39return _distributedCache.SetAsync(key, value, options);
Microsoft.AspNetCore.Session (1)
DistributedSession.cs (1)
279await _cache.SetAsync(
Microsoft.Extensions.Caching.Abstractions (3)
DistributedCacheExtensions.cs (2)
45return cache.SetAsync(key, value, new DistributedCacheEntryOptions(), token); 105return cache.SetAsync(key, Encoding.UTF8.GetBytes(value), options, token);
IBufferDistributedCache.cs (1)
50/// <remarks>This method is functionally similar to <see cref="IDistributedCache.SetAsync(string, byte[], DistributedCacheEntryOptions, CancellationToken)"/>, but avoids the array allocation.</remarks>
Microsoft.Extensions.Caching.Hybrid (1)
Internal\DefaultHybridCache.L2.cs (1)
83return new(_backendCache!.SetAsync(key, arr, GetOptions(options), token));
Microsoft.Extensions.Caching.Hybrid.Tests (1)
DistributedCacheTests.cs (1)
119await cache.SetAsync(key, expected, _fiveMinutes);
Microsoft.Extensions.Caching.SqlServer.Tests (22)
SqlServerCacheWithDatabaseTest.cs (22)
83return cache.SetAsync( 103await cache.SetAsync( 132await cache.SetAsync(key, expectedValue, new DistributedCacheEntryOptions() 173await cache.SetAsync(key, expectedValue, new DistributedCacheEntryOptions() 212await cache.SetAsync( 233await cache.SetAsync( 261await cache.SetAsync( 292await cache.SetAsync( 316await cache.SetAsync( 339await cache.SetAsync( 368await cache.SetAsync( 396await cache.SetAsync( 425await cache.SetAsync( 439await cache.SetAsync( 465await cache.SetAsync( 492await cache.SetAsync( 522await cache.SetAsync( 578await cache.SetAsync( 609await cache.SetAsync( 634await cache.SetAsync( 654await cache.SetAsync( 674await cache.SetAsync(
Microsoft.Extensions.Caching.StackExchangeRedis.Tests (13)
TimeExpirationAsyncTests.cs (13)
48await cache.SetAsync(key, value, new DistributedCacheEntryOptions().SetAbsoluteExpiration(expected)); 62await cache.SetAsync(key, value, new DistributedCacheEntryOptions().SetAbsoluteExpiration(TimeSpan.FromSeconds(1))); 83await cache.SetAsync(key, value, new DistributedCacheEntryOptions().SetAbsoluteExpiration(TimeSpan.FromSeconds(0.25))); 98await cache.SetAsync(key, value, new DistributedCacheEntryOptions().SetAbsoluteExpiration(TimeSpan.FromMinutes(-1))); 114await cache.SetAsync(key, value, new DistributedCacheEntryOptions().SetAbsoluteExpiration(TimeSpan.Zero)); 128await cache.SetAsync(key, value, new DistributedCacheEntryOptions().SetAbsoluteExpiration(TimeSpan.FromSeconds(1))); 148await cache.SetAsync(key, value, new DistributedCacheEntryOptions().SetAbsoluteExpiration(TimeSpan.FromSeconds(0.25))); 163await cache.SetAsync(key, value, new DistributedCacheEntryOptions().SetSlidingExpiration(TimeSpan.FromMinutes(-1))); 176await cache.SetAsync(key, value, new DistributedCacheEntryOptions().SetSlidingExpiration(TimeSpan.Zero)); 190await cache.SetAsync(key, value, new DistributedCacheEntryOptions().SetSlidingExpiration(TimeSpan.FromSeconds(1))); 208await cache.SetAsync(key, value, new DistributedCacheEntryOptions().SetSlidingExpiration(TimeSpan.FromSeconds(0.25))); 221await cache.SetAsync(key, value, new DistributedCacheEntryOptions().SetSlidingExpiration(TimeSpan.FromSeconds(1))); 246await cache.SetAsync(key, value, new DistributedCacheEntryOptions()