CachingClientUpdateCachedContentAsync Method

Updates an existing cached content resource by modifying supported fields, such as expiration time.

Definition

Namespace: GenerativeAI.Clients
Assembly: GenerativeAI (in GenerativeAI.dll) Version: 2.0.2+aa51399cad6d90cc71158d589a6268608b3c1893
C#
public Task<CachedContent?> UpdateCachedContentAsync(
	string cacheName,
	CachedContent cachedContent,
	string? updateMask = null,
	CancellationToken cancellationToken = default
)

Parameters

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.

Return Value

TaskCachedContent
A task representing the asynchronous operation, containing the updated cached content resource.

See Also