DiskBasedResponseCache Class
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 IDistributedCache implementation that stores cached AI responses for a particular ScenarioRun on disk.
public ref class DiskBasedResponseCache sealed : Microsoft::Extensions::Caching::Distributed::IDistributedCache
public sealed class DiskBasedResponseCache : Microsoft.Extensions.Caching.Distributed.IDistributedCache
type DiskBasedResponseCache = class
interface IDistributedCache
Public NotInheritable Class DiskBasedResponseCache
Implements IDistributedCache
- Inheritance
-
DiskBasedResponseCache
- Implements
DiskBasedResponseCache can be used in conjunction with ResponseCachingChatClient to implement disk-based caching of all AI responses that happen as part of an evaluation run.
Disk |
Initializes a new instance of the DiskBasedResponseCache class. |
Get(String) |
Gets a value with the given key. |
Get |
Gets a value with the given key. |
Refresh(String) |
Refreshes a value in the cache based on its key, resetting its sliding expiration timeout (if any). |
Refresh |
Refreshes a value in the cache based on its key, resetting its sliding expiration timeout (if any). |
Remove(String) |
Removes the value with the given key. |
Remove |
Removes the value with the given key. |
Set(String, Byte[], Distributed |
Sets a value with the given key. |
Set |
Sets the value with the given key. |
Get |
Gets a string from the specified cache with the specified key. |
Get |
Asynchronously gets a string from the specified cache with the specified key. |
Set(IDistributed |
Sets a sequence of bytes in the specified cache with the specified key. |
Set |
Asynchronously sets a sequence of bytes in the specified cache with the specified key. |
Set |
Sets a string in the specified cache with the specified key. |
Set |
Sets a string in the specified cache with the specified key. |
Set |
Asynchronously sets a string in the specified cache with the specified key. |
Set |
Asynchronously sets a string in the specified cache with the specified key. |
Toode | Versioonid |
---|---|
.NET | 8 (package-provided), 9 (package-provided), 10 (package-provided) |
.NET Standard | 2.0 (package-provided) |
Toote „.NET“ tagasiside
.NET on avatud lähtekoodiga projekt. Tagasiside andmiseks valige link: