EvaluationResponseCacheProvider class abstract
Provides ResponseCache instances scoped to a particular scenario run.
When response caching is enabled, AI-generated responses are stored per scenario/iteration key. Subsequent runs with identical inputs reuse cached responses instead of calling the model again.
- Implementers
- Annotations
-
- @Source(name: 'IEvaluationResponseCacheProvider.cs', namespace: 'Microsoft.Extensions.AI.Evaluation.Reporting', repository: 'dotnet/extensions', path: 'src/Libraries/Microsoft.Extensions.AI.Evaluation.Reporting/')
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
deleteExpiredCacheEntries(
{CancellationToken? cancellationToken}) → Future< void> - Removes all expired cache entries.
-
getCache(
String scenarioName, String iterationName, {CancellationToken? cancellationToken}) → Future< ResponseCache> -
Returns a ResponseCache for responses associated with the given
scenarioNameanditerationName. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
reset(
{CancellationToken? cancellationToken}) → Future< void> - Clears all cached AI responses.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited