CachingClientUpdateCachedContentAsync Method
Updates an existing cached content resource by modifying supported fields, such as expiration time.
Namespace: GenerativeAI.ClientsAssembly: GenerativeAI (in GenerativeAI.dll) Version: 2.0.2+aa51399cad6d90cc71158d589a6268608b3c1893
public Task<CachedContent?> UpdateCachedContentAsync(
string cacheName,
CachedContent cachedContent,
string? updateMask = null,
CancellationToken cancellationToken = default
)
- cacheName String
- The name of the cache containing the cached content to update.
- cachedContent CachedContent
- The cached content resource with updated values.
- updateMask String (Optional)
- Optional. Specifies which fields in the cache content resource to update.
- cancellationToken CancellationToken (Optional)
- Optional. A token for canceling the asynchronous operation.
TaskCachedContentA task representing the asynchronous operation, containing the updated cached content resource.