v2026.5.2
All Bundles

CachedContentItem

A context cache entry created by the Gemini Caching API

Inherits: EndPoint

Operations

GetCreateTime

Get creation timestamp

method : public : GetCreateTime() ~ String

Return

TypeDescription
Stringcreation time (RFC 3339)

GetDisplayName

Get display name

method : public : GetDisplayName() ~ String

Return

TypeDescription
Stringdisplay name

GetExpireTime

Get expiration timestamp

method : public : GetExpireTime() ~ String

Return

TypeDescription
Stringexpiration time (RFC 3339)

GetModel

Get the model this cache was created for

method : public : GetModel() ~ String

Return

TypeDescription
Stringmodel name

GetName

Get cache resource name (e.g. "cachedContents/abc123")

method : public : GetName() ~ String

Return

TypeDescription
Stringresource name

GetTokenCount

Get total token count stored in cache

method : public : GetTokenCount() ~ Int

Return

TypeDescription
Inttoken count