DiskBasedResponseCacheProvider(String, Nullable<TimeSpan>) Constructor
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
An IEvaluationResponseCacheProvider that returns an IDistributedCache that can cache
AI responses for a particular ScenarioRun under the specified storageRootPath
on
disk.
public DiskBasedResponseCacheProvider(string storageRootPath, TimeSpan? timeToLiveForCacheEntries = default);
new Microsoft.Extensions.AI.Evaluation.Reporting.Storage.DiskBasedResponseCacheProvider : string * Nullable<TimeSpan> -> Microsoft.Extensions.AI.Evaluation.Reporting.Storage.DiskBasedResponseCacheProvider
Public Sub New (storageRootPath As String, Optional timeToLiveForCacheEntries As Nullable(Of TimeSpan) = Nothing)
Parameters
- storageRootPath
- String
The path to a directory on disk under which the cached AI responses should be stored.
An optional TimeSpan that specifies the maximum amount of time that cached AI responses should survive in the cache before they are considered expired and evicted.