CheckSessionResponseCache Class
In-memory cache for formatted check-session results. The result objects are stateless (they hold only the HTML template and mint a fresh nonce per execution), so caching them across requests is safe.
public class CheckSessionResponseCache : Abblix.Oidc.Server.MinimalApi.Features.SessionManagement.ICheckSessionResponseCacheInheritance System.Object → CheckSessionResponseCache
Implements ICheckSessionResponseCache
Constructors
CheckSessionResponseCache(IOptions<MemoryCacheOptions>) Constructor
In-memory cache for formatted check-session results. The result objects are stateless (they hold only the HTML template and mint a fresh nonce per execution), so caching them across requests is safe.
public CheckSessionResponseCache(Microsoft.Extensions.Options.IOptions<Microsoft.Extensions.Caching.Memory.MemoryCacheOptions> cacheOptions);Parameters
cacheOptions Microsoft.Extensions.Options.IOptions<Microsoft.Extensions.Caching.Memory.MemoryCacheOptions>
Methods
CheckSessionResponseCache.GetOrAddAsync(object, Func<Task<IResult>>) Method
Gets the result for the key from the cache, or produces and stores it via factory.
public System.Threading.Tasks.Task<Microsoft.AspNetCore.Http.IResult> GetOrAddAsync(object key, System.Func<System.Threading.Tasks.Task<Microsoft.AspNetCore.Http.IResult>> factory);Parameters
key System.Object
The key identifying the cached result.
factory System.Func<System.Threading.Tasks.Task<Microsoft.AspNetCore.Http.IResult>>
Produces the result when the key is not yet cached.
Implements GetOrAddAsync(object, Func<Task<IResult>>)
Returns
System.Threading.Tasks.Task<Microsoft.AspNetCore.Http.IResult>
The cached or newly produced Microsoft.AspNetCore.Http.IResult.