Show / Hide Table of Contents

# Interface IOpenIddictApplicationCache<TApplication>

Provides methods allowing to cache applications after retrieving them from the store.

###### Namespace: OpenIddict.Abstractions

###### Assembly: cs.temp.dll.dll

##### Syntax

    public interface IOpenIddictApplicationCache<TApplication>
        where TApplication : class

##### Type Parameters

Name | Description
--- | ---
TApplication | The type of the Application entity.

### Methods

#### AddAsync(TApplication, CancellationToken)

Add the specified application to the cache.

##### Declaration

    ValueTask AddAsync(TApplication application, CancellationToken cancellationToken)

##### Parameters

Type | Name | Description
--- | --- | ---
TApplication | application | The application to add to the cache.
CancellationToken | cancellationToken | The that can be used to abort the operation.

##### Returns

Type | Description
--- | ---
ValueTask | A that can be used to monitor the asynchronous operation.

#### FindByClientIdAsync(String, CancellationToken)

Retrieves an application using its client identifier.

##### Declaration

    ValueTask<TApplication> FindByClientIdAsync(string identifier, CancellationToken cancellationToken)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | identifier | The client identifier associated with the application.
CancellationToken | cancellationToken | The that can be used to abort the operation.

##### Returns

Type | Description
--- | ---
ValueTask<TApplication> | A that can be used to monitor the asynchronous operation, whose result returns the client application corresponding to the identifier.

#### FindByIdAsync(String, CancellationToken)

Retrieves an application using its unique identifier.

##### Declaration

    ValueTask<TApplication> FindByIdAsync(string identifier, CancellationToken cancellationToken)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | identifier | The unique identifier associated with the application.
CancellationToken | cancellationToken | The that can be used to abort the operation.

##### Returns

Type | Description
--- | ---
ValueTask<TApplication> | A that can be used to monitor the asynchronous operation, whose result returns the client application corresponding to the identifier.

#### FindByPostLogoutRedirectUriAsync(String, CancellationToken)

Retrieves all the applications associated with the specified redirect_uri.

##### Declaration

    IAsyncEnumerable<TApplication> FindByPostLogoutRedirectUriAsync(string address, CancellationToken cancellationToken)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | address | The redirect_uri associated with the applications.
CancellationToken | cancellationToken | The that can be used to abort the operation.

##### Returns

Type | Description
--- | ---
IAsyncEnumerable<TApplication> | The client applications corresponding to the specified redirect_uri.

#### FindByRedirectUriAsync(String, CancellationToken)

Retrieves all the applications associated with the specified redirect_uri.

##### Declaration

    IAsyncEnumerable<TApplication> FindByRedirectUriAsync(string address, CancellationToken cancellationToken)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | address | The redirect_uri associated with the applications.
CancellationToken | cancellationToken | The that can be used to abort the operation.

##### Returns

Type | Description
--- | ---
IAsyncEnumerable<TApplication> | The client applications corresponding to the specified redirect_uri.

#### RemoveAsync(TApplication, CancellationToken)

Removes the specified application from the cache.

##### Declaration

    ValueTask RemoveAsync(TApplication application, CancellationToken cancellationToken)

##### Parameters

Type | Name | Description
--- | --- | ---
TApplication | application | The application to remove from the cache.
CancellationToken | cancellationToken | The that can be used to abort the operation.

##### Returns

Type | Description
--- | ---
ValueTask | A that can be used to monitor the asynchronous operation.