ResponseCache class abstract
A key-value cache for ChatResponses used during evaluation.
- Implementers
- Annotations
-
- @Source(name: 'IDistributedCache.cs', namespace: 'Microsoft.Extensions.Caching.Distributed', repository: 'dotnet/runtime', path: 'src/libraries/Microsoft.Extensions.Caching.Abstractions/')
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
-
deleteExpiredEntries(
) → Future< void> - Removes all expired entries from the cache.
-
get(
String key) → Future< ChatResponse?> -
Returns the cached ChatResponse for
key, ornullif not found or expired. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
remove(
String key) → Future< void> -
Removes the entry for
keyfrom the cache. -
reset(
) → Future< void> - Clears all entries from the cache.
-
set(
String key, ChatResponse response) → Future< void> -
Stores
responsein the cache underkey. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited