Skip to content

CheckSessionResponseCache Class

Represents a cache for storing and retrieving CheckSession responses asynchronously.

C#
public class CheckSessionResponseCache : Abblix.Oidc.Server.Mvc.Features.SessionManagement.ICheckSessionResponseCache

Inheritance System.Object → CheckSessionResponseCache

Implements ICheckSessionResponseCache

Remarks

This cache is used to store CheckSession responses for quick retrieval, reducing the need to recompute them for the same input key.

Constructors

CheckSessionResponseCache(IOptions<MemoryCacheOptions>) Constructor

Represents a cache for storing and retrieving CheckSession responses asynchronously.

C#
public CheckSessionResponseCache(Microsoft.Extensions.Options.IOptions<Microsoft.Extensions.Caching.Memory.MemoryCacheOptions> cacheOptions);

Parameters

cacheOptions Microsoft.Extensions.Options.IOptions<Microsoft.Extensions.Caching.Memory.MemoryCacheOptions>

The options to configure the memory cache.

Remarks

This cache is used to store CheckSession responses for quick retrieval, reducing the need to recompute them for the same input key.

Methods

CheckSessionResponseCache.GetOrAddAsync(object, Func<Task<ActionResult>>) Method

Gets an ActionResult from the cache with the specified key, or adds it to the cache if not present.

C#
public System.Threading.Tasks.Task<Microsoft.AspNetCore.Mvc.ActionResult> GetOrAddAsync(object key, System.Func<System.Threading.Tasks.Task<Microsoft.AspNetCore.Mvc.ActionResult>> factory);

Parameters

key System.Object

The key used to identify the item in the cache.

factory System.Func<System.Threading.Tasks.Task<Microsoft.AspNetCore.Mvc.ActionResult>>

A delegate that provides the ActionResult to be added to the cache if it doesn't exist.

Implements GetOrAddAsync(object, Func<Task<ActionResult>>)

Returns

System.Threading.Tasks.Task<Microsoft.AspNetCore.Mvc.ActionResult>
A System.Threading.Tasks.Task<> representing the asynchronous operation. The task result contains the cached or newly generated ActionResult.