Skip to content

ICheckSessionResponseCache Interface

Represents a cache for storing and retrieving Check Session response data.

C#
public interface ICheckSessionResponseCache

Derived
CheckSessionResponseCache

Methods

ICheckSessionResponseCache.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#
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.

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.