Show / Hide Table of Contents

# Class OpenIddictTokenCache<TToken>

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

##### Inheritance

System.Object
OpenIddictTokenCache<TToken>

##### Implements

System.IDisposable

###### Namespace: OpenIddict.Core

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

##### Syntax

    public class OpenIddictTokenCache<TToken> : IOpenIddictTokenCache<TToken>, IDisposable where TToken : class

##### Type Parameters

Name | Description
--- | ---
TToken | The type of the Token entity.

### Constructors

#### OpenIddictTokenCache(IOptionsMonitor<OpenIddictCoreOptions>, IOpenIddictTokenStoreResolver)

##### Declaration

    public OpenIddictTokenCache(IOptionsMonitor<OpenIddictCoreOptions> options, IOpenIddictTokenStoreResolver resolver)

##### Parameters

Type | Name | Description
--- | --- | ---
IOptionsMonitor<OpenIddictCoreOptions> | options |
IOpenIddictTokenStoreResolver | resolver |

### Methods

#### AddAsync(TToken, CancellationToken)

##### Declaration

    public ValueTask AddAsync(TToken token, CancellationToken cancellationToken)

##### Parameters

Type | Name | Description
--- | --- | ---
TToken | token |
CancellationToken | cancellationToken |

##### Returns

Type | Description
--- | ---
ValueTask |

#### Dispose()

##### Declaration

    public void Dispose()

#### FindAsync(String, String, CancellationToken)

##### Declaration

    public IAsyncEnumerable<TToken> FindAsync(string subject, string client, CancellationToken cancellationToken)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | subject |
System.String | client |
CancellationToken | cancellationToken |

##### Returns

Type | Description
--- | ---
IAsyncEnumerable<TToken> |

#### FindAsync(String, String, String, CancellationToken)

##### Declaration

    public IAsyncEnumerable<TToken> FindAsync(string subject, string client, string status, CancellationToken cancellationToken)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | subject |
System.String | client |
System.String | status |
CancellationToken | cancellationToken |

##### Returns

Type | Description
--- | ---
IAsyncEnumerable<TToken> |

#### FindAsync(String, String, String, String, CancellationToken)

##### Declaration

    public IAsyncEnumerable<TToken> FindAsync(string subject, string client, string status, string type, CancellationToken cancellationToken)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | subject |
System.String | client |
System.String | status |
System.String | type |
CancellationToken | cancellationToken |

##### Returns

Type | Description
--- | ---
IAsyncEnumerable<TToken> |

#### FindByApplicationIdAsync(String, CancellationToken)

##### Declaration

    public IAsyncEnumerable<TToken> FindByApplicationIdAsync(string identifier, CancellationToken cancellationToken)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | identifier |
CancellationToken | cancellationToken |

##### Returns

Type | Description
--- | ---
IAsyncEnumerable<TToken> |

#### FindByAuthorizationIdAsync(String, CancellationToken)

##### Declaration

    public IAsyncEnumerable<TToken> FindByAuthorizationIdAsync(string identifier, CancellationToken cancellationToken)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | identifier |
CancellationToken | cancellationToken |

##### Returns

Type | Description
--- | ---
IAsyncEnumerable<TToken> |

#### FindByIdAsync(String, CancellationToken)

##### Declaration

    public ValueTask<TToken> FindByIdAsync(string identifier, CancellationToken cancellationToken)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | identifier |
CancellationToken | cancellationToken |

##### Returns

Type | Description
--- | ---
ValueTask<TToken> |

### Implements

System.IDisposable