Language

TurnStateLoader Class

Definition

Loads and saves per-turn state from a distributed cache. Manages two state scopes: conversation-scoped and user-scoped.

public sealed class TurnStateLoader
type TurnStateLoader = class
Public NotInheritable Class TurnStateLoader
Inheritance
TurnStateLoader

Constructors

Name Description
TurnStateLoader(IDistributedCache, IOptions<TurnStateOptions>, ILogger<TurnStateLoader>)

Initializes a new instance of the TurnStateLoader class.

Methods

Name Description
DeleteAsync(String, String, CancellationToken)

Removes conversation and/or user state from the cache.

LoadAsync(String, String, CancellationToken)

Loads conversation and user state from the cache.

SaveAsync(TurnStateContainer, String, String, CancellationToken)

Saves dirty state back to the cache.

Applies to