DiskBasedResponseCacheProvider class
An EvaluationResponseCacheProvider that stores response caches on disk.
- Implemented types
- Annotations
-
- @Source(name: 'DiskBasedResponseCacheProvider.cs', namespace: 'Microsoft.Extensions.AI.Evaluation.Reporting.Storage', repository: 'dotnet/extensions', path: 'src/Libraries/Microsoft.Extensions.AI.Evaluation.Reporting.Storage/')
Constructors
- DiskBasedResponseCacheProvider(String storageRootPath, {Duration timeToLive = const Duration(days: 14), DateTime clock()?})
-
Creates a DiskBasedResponseCacheProvider rooted at
storageRootPath.
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.
override
-
getCache(
String scenarioName, String iterationName, {CancellationToken? cancellationToken}) → Future< ResponseCache> -
Returns a ResponseCache for responses associated with the given
scenarioNameanditerationName.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
reset(
{CancellationToken? cancellationToken}) → Future< void> -
Clears all cached AI responses.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited