DiskBasedResponseCacheProvider Class

Definition

An IEvaluationResponseCacheProvider that returns an IDistributedCache that can cache AI responses for a particular ScenarioRun under the specified storageRootPath on disk.

public ref class DiskBasedResponseCacheProvider sealed : Microsoft::Extensions::AI::Evaluation::Reporting::IEvaluationResponseCacheProvider
public sealed class DiskBasedResponseCacheProvider : Microsoft.Extensions.AI.Evaluation.Reporting.IEvaluationResponseCacheProvider
type DiskBasedResponseCacheProvider = class
    interface IEvaluationResponseCacheProvider
Public NotInheritable Class DiskBasedResponseCacheProvider
Implements IEvaluationResponseCacheProvider
Inheritance
DiskBasedResponseCacheProvider
Implements

Constructors

DiskBasedResponseCacheProvider(String, Nullable<TimeSpan>)

An IEvaluationResponseCacheProvider that returns an IDistributedCache that can cache AI responses for a particular ScenarioRun under the specified storageRootPath on disk.

Methods

DeleteExpiredCacheEntriesAsync(CancellationToken)

Deletes expired cache entries for all ScenarioRuns.

GetCacheAsync(String, String, CancellationToken)

Returns an IDistributedCache that caches all the AI responses associated with the ScenarioRun with the supplied scenarioName and iterationName.

ResetAsync(CancellationToken)

Deletes cached AI responses for all ScenarioRuns.

Applies to