#### [Abblix\.Oidc\.Server\.Mvc](https://www.abblix.com/en/docs/api/abblix-oidc-server-mvc 'index')
### [Abblix\.Oidc\.Server\.Mvc\.Features\.SessionManagement](https://www.abblix.com/en/docs/api/abblix-oidc-server-mvc/Abblix.Oidc.Server.Mvc.Features.SessionManagement 'Abblix\.Oidc\.Server\.Mvc\.Features\.SessionManagement')

## CheckSessionResponseCachingDecorator Class

A decorator class that adds caching functionality to the Check Session response formatting process\.

```csharp
public class CheckSessionResponseCachingDecorator : Abblix.Oidc.Server.Mvc.Formatters.Interfaces.ICheckSessionResponseFormatter
```

Inheritance [System\.Object](https://learn.microsoft.com/en-us/dotnet/api/system.object 'System\.Object') → CheckSessionResponseCachingDecorator

Implements [ICheckSessionResponseFormatter](https://www.abblix.com/en/docs/api/abblix-oidc-server-mvc/Abblix.Oidc.Server.Mvc.Formatters.Interfaces.ICheckSessionResponseFormatter 'Abblix\.Oidc\.Server\.Mvc\.Formatters\.Interfaces\.ICheckSessionResponseFormatter')
### Constructors

## CheckSessionResponseCachingDecorator\(ICheckSessionResponseFormatter, ICheckSessionResponseCache\) Constructor {#Abblix.Oidc.Server.Mvc.Features.SessionManagement.CheckSessionResponseCachingDecorator.CheckSessionResponseCachingDecorator(Abblix.Oidc.Server.Mvc.Formatters.Interfaces.ICheckSessionResponseFormatter,Abblix.Oidc.Server.Mvc.Features.SessionManagement.ICheckSessionResponseCache)}

A decorator class that adds caching functionality to the Check Session response formatting process\.

```csharp
public CheckSessionResponseCachingDecorator(Abblix.Oidc.Server.Mvc.Formatters.Interfaces.ICheckSessionResponseFormatter inner, Abblix.Oidc.Server.Mvc.Features.SessionManagement.ICheckSessionResponseCache cache);
```
#### Parameters

###### `inner` [ICheckSessionResponseFormatter](https://www.abblix.com/en/docs/api/abblix-oidc-server-mvc/Abblix.Oidc.Server.Mvc.Formatters.Interfaces.ICheckSessionResponseFormatter 'Abblix\.Oidc\.Server\.Mvc\.Formatters\.Interfaces\.ICheckSessionResponseFormatter') {#Abblix.Oidc.Server.Mvc.Features.SessionManagement.CheckSessionResponseCachingDecorator.CheckSessionResponseCachingDecorator(Abblix.Oidc.Server.Mvc.Formatters.Interfaces.ICheckSessionResponseFormatter,Abblix.Oidc.Server.Mvc.Features.SessionManagement.ICheckSessionResponseCache).inner}

The inner Check Session response formatter\.

###### `cache` [ICheckSessionResponseCache](https://www.abblix.com/en/docs/api/abblix-oidc-server-mvc/Abblix.Oidc.Server.Mvc.Features.SessionManagement.ICheckSessionResponseCache 'Abblix\.Oidc\.Server\.Mvc\.Features\.SessionManagement\.ICheckSessionResponseCache') {#Abblix.Oidc.Server.Mvc.Features.SessionManagement.CheckSessionResponseCachingDecorator.CheckSessionResponseCachingDecorator(Abblix.Oidc.Server.Mvc.Formatters.Interfaces.ICheckSessionResponseFormatter,Abblix.Oidc.Server.Mvc.Features.SessionManagement.ICheckSessionResponseCache).cache}

The cache used to store formatted responses\.
### Methods

## CheckSessionResponseCachingDecorator\.FormatResponseAsync\(CheckSessionResponse\) Method {#Abblix.Oidc.Server.Mvc.Features.SessionManagement.CheckSessionResponseCachingDecorator.FormatResponseAsync(Abblix.Oidc.Server.Endpoints.CheckSession.Interfaces.CheckSessionResponse)}

Formats a Check Session response and caches the formatted result using the provided response's cache key\.

```csharp
public System.Threading.Tasks.Task<Microsoft.AspNetCore.Mvc.ActionResult> FormatResponseAsync(Abblix.Oidc.Server.Endpoints.CheckSession.Interfaces.CheckSessionResponse response);
```
#### Parameters

###### `response` [CheckSessionResponse](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Endpoints.CheckSession.Interfaces.CheckSessionResponse 'Abblix\.Oidc\.Server\.Endpoints\.CheckSession\.Interfaces\.CheckSessionResponse') {#Abblix.Oidc.Server.Mvc.Features.SessionManagement.CheckSessionResponseCachingDecorator.FormatResponseAsync(Abblix.Oidc.Server.Endpoints.CheckSession.Interfaces.CheckSessionResponse).response}

The Check Session response to be formatted\.

Implements [FormatResponseAsync\(CheckSessionResponse\)](https://www.abblix.com/en/docs/api/abblix-oidc-server-mvc/Abblix.Oidc.Server.Mvc.Formatters.Interfaces.ICheckSessionResponseFormatter#Abblix.Oidc.Server.Mvc.Formatters.Interfaces.ICheckSessionResponseFormatter.FormatResponseAsync(Abblix.Oidc.Server.Endpoints.CheckSession.Interfaces.CheckSessionResponse) 'Abblix\.Oidc\.Server\.Mvc\.Formatters\.Interfaces\.ICheckSessionResponseFormatter\.FormatResponseAsync\(Abblix\.Oidc\.Server\.Endpoints\.CheckSession\.Interfaces\.CheckSessionResponse\)')

#### Returns
[System\.Threading\.Tasks\.Task&lt;](https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.task-1 'System\.Threading\.Tasks\.Task\`1')[Microsoft\.AspNetCore\.Mvc\.ActionResult](https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.mvc.actionresult 'Microsoft\.AspNetCore\.Mvc\.ActionResult')[&gt;](https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.task-1 'System\.Threading\.Tasks\.Task\`1')  
A [System\.Threading\.Tasks\.Task&lt;&gt;](https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.task-1 'System\.Threading\.Tasks\.Task\`1') representing the asynchronous operation\. The task result contains
the formatted ActionResult, either retrieved from the cache or generated by the inner formatter\.
