Input only. The TTL for this resource. The expiration time is computed: now + TTL.
↳ name
string
Immutable. Identifier. The server-generated resource name of the cached content Format: projects/{project}/locations/{location}/cachedContents/{cached_content}
↳ display_name
string
Optional. Immutable. The user-generated meaningful display name of the cached content.
↳ model
string
Immutable. The name of theModelto use for cached content. Currently, only the published Gemini base models are supported, in form of projects/{PROJECT}/locations/{LOCATION}/publishers/google/models/{MODEL}
Input only. Immutable. Customer-managed encryption key spec for aCachedContent. If set, thisCachedContentand all its sub-resources will be secured by this key.
getExpireTime
Timestamp of when this resource is considered expired.
This isalwaysprovided on output, regardless of what was sent
on input.
Immutable. Identifier. The server-generated resource name of the cached
content Format:
projects/{project}/locations/{location}/cachedContents/{cached_content}
Returns
Type
Description
string
setName
Immutable. Identifier. The server-generated resource name of the cached
content Format:
projects/{project}/locations/{location}/cachedContents/{cached_content}
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getDisplayName
Optional. Immutable. The user-generated meaningful display name of the
cached content.
Returns
Type
Description
string
setDisplayName
Optional. Immutable. The user-generated meaningful display name of the
cached content.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getModel
Immutable. The name of theModelto use for cached content. Currently,
only the published Gemini base models are supported, in form of
projects/{PROJECT}/locations/{LOCATION}/publishers/google/models/{MODEL}
Returns
Type
Description
string
setModel
Immutable. The name of theModelto use for cached content. Currently,
only the published Gemini base models are supported, in form of
projects/{PROJECT}/locations/{LOCATION}/publishers/google/models/{MODEL}
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getSystemInstruction
Optional. Input only. Immutable. Developer set system instruction.
Input only. Immutable. Customer-managed encryption key spec for aCachedContent. If set, thisCachedContentand all its sub-resources
will be secured by this key.
Input only. Immutable. Customer-managed encryption key spec for aCachedContent. If set, thisCachedContentand all its sub-resources
will be secured by this key.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-09 UTC."],[],[],null,["# Google Cloud Ai Platform V1 Client - Class CachedContent (1.35.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.35.0 (latest)](/php/docs/reference/cloud-ai-platform/latest/V1.CachedContent)\n- [1.34.0](/php/docs/reference/cloud-ai-platform/1.34.0/V1.CachedContent)\n- [1.33.0](/php/docs/reference/cloud-ai-platform/1.33.0/V1.CachedContent)\n- [1.32.1](/php/docs/reference/cloud-ai-platform/1.32.1/V1.CachedContent)\n- [1.31.0](/php/docs/reference/cloud-ai-platform/1.31.0/V1.CachedContent)\n- [1.30.0](/php/docs/reference/cloud-ai-platform/1.30.0/V1.CachedContent)\n- [1.26.0](/php/docs/reference/cloud-ai-platform/1.26.0/V1.CachedContent)\n- [1.23.0](/php/docs/reference/cloud-ai-platform/1.23.0/V1.CachedContent)\n- [1.22.0](/php/docs/reference/cloud-ai-platform/1.22.0/V1.CachedContent)\n- [1.21.0](/php/docs/reference/cloud-ai-platform/1.21.0/V1.CachedContent)\n- [1.20.0](/php/docs/reference/cloud-ai-platform/1.20.0/V1.CachedContent)\n- [1.19.0](/php/docs/reference/cloud-ai-platform/1.19.0/V1.CachedContent)\n- [1.18.0](/php/docs/reference/cloud-ai-platform/1.18.0/V1.CachedContent)\n- [1.17.0](/php/docs/reference/cloud-ai-platform/1.17.0/V1.CachedContent)\n- [1.16.0](/php/docs/reference/cloud-ai-platform/1.16.0/V1.CachedContent)\n- [1.15.0](/php/docs/reference/cloud-ai-platform/1.15.0/V1.CachedContent)\n- [1.14.0](/php/docs/reference/cloud-ai-platform/1.14.0/V1.CachedContent)\n- [1.13.1](/php/docs/reference/cloud-ai-platform/1.13.1/V1.CachedContent)\n- [1.12.0](/php/docs/reference/cloud-ai-platform/1.12.0/V1.CachedContent)\n- [1.11.0](/php/docs/reference/cloud-ai-platform/1.11.0/V1.CachedContent)\n- [1.10.0](/php/docs/reference/cloud-ai-platform/1.10.0/V1.CachedContent)\n- [1.9.0](/php/docs/reference/cloud-ai-platform/1.9.0/V1.CachedContent)\n- [1.8.0](/php/docs/reference/cloud-ai-platform/1.8.0/V1.CachedContent)\n- [1.7.0](/php/docs/reference/cloud-ai-platform/1.7.0/V1.CachedContent)\n- [1.6.0](/php/docs/reference/cloud-ai-platform/1.6.0/V1.CachedContent)\n- [1.5.0](/php/docs/reference/cloud-ai-platform/1.5.0/V1.CachedContent)\n- [1.4.0](/php/docs/reference/cloud-ai-platform/1.4.0/V1.CachedContent)\n- [1.3.0](/php/docs/reference/cloud-ai-platform/1.3.0/V1.CachedContent)\n- [1.2.0](/php/docs/reference/cloud-ai-platform/1.2.0/V1.CachedContent)\n- [1.1.0](/php/docs/reference/cloud-ai-platform/1.1.0/V1.CachedContent)\n- [1.0.0](/php/docs/reference/cloud-ai-platform/1.0.0/V1.CachedContent)\n- [0.39.0](/php/docs/reference/cloud-ai-platform/0.39.0/V1.CachedContent)\n- [0.38.0](/php/docs/reference/cloud-ai-platform/0.38.0/V1.CachedContent)\n- [0.37.1](/php/docs/reference/cloud-ai-platform/0.37.1/V1.CachedContent)\n- [0.32.0](/php/docs/reference/cloud-ai-platform/0.32.0/V1.CachedContent)\n- [0.31.0](/php/docs/reference/cloud-ai-platform/0.31.0/V1.CachedContent)\n- [0.30.0](/php/docs/reference/cloud-ai-platform/0.30.0/V1.CachedContent)\n- [0.29.0](/php/docs/reference/cloud-ai-platform/0.29.0/V1.CachedContent)\n- [0.28.0](/php/docs/reference/cloud-ai-platform/0.28.0/V1.CachedContent)\n- [0.27.0](/php/docs/reference/cloud-ai-platform/0.27.0/V1.CachedContent)\n- [0.26.2](/php/docs/reference/cloud-ai-platform/0.26.2/V1.CachedContent)\n- [0.25.0](/php/docs/reference/cloud-ai-platform/0.25.0/V1.CachedContent)\n- [0.24.0](/php/docs/reference/cloud-ai-platform/0.24.0/V1.CachedContent)\n- [0.23.0](/php/docs/reference/cloud-ai-platform/0.23.0/V1.CachedContent)\n- [0.22.0](/php/docs/reference/cloud-ai-platform/0.22.0/V1.CachedContent)\n- [0.21.0](/php/docs/reference/cloud-ai-platform/0.21.0/V1.CachedContent)\n- [0.20.0](/php/docs/reference/cloud-ai-platform/0.20.0/V1.CachedContent)\n- [0.19.0](/php/docs/reference/cloud-ai-platform/0.19.0/V1.CachedContent)\n- [0.18.0](/php/docs/reference/cloud-ai-platform/0.18.0/V1.CachedContent)\n- [0.17.0](/php/docs/reference/cloud-ai-platform/0.17.0/V1.CachedContent)\n- [0.16.0](/php/docs/reference/cloud-ai-platform/0.16.0/V1.CachedContent)\n- [0.15.0](/php/docs/reference/cloud-ai-platform/0.15.0/V1.CachedContent)\n- [0.13.0](/php/docs/reference/cloud-ai-platform/0.13.0/V1.CachedContent)\n- [0.12.0](/php/docs/reference/cloud-ai-platform/0.12.0/V1.CachedContent)\n- [0.11.1](/php/docs/reference/cloud-ai-platform/0.11.1/V1.CachedContent)\n- [0.10.0](/php/docs/reference/cloud-ai-platform/0.10.0/V1.CachedContent) \nReference documentation and code samples for the Google Cloud Ai Platform V1 Client class CachedContent.\n\nA resource used in LLM queries for users to explicitly specify what to cache\nand how to cache.\n\nGenerated from protobuf message `google.cloud.aiplatform.v1.CachedContent`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ AIPlatform \\\\ V1\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getExpireTime\n\nTimestamp of when this resource is considered expired.\n\nThis is *always* provided on output, regardless of what was sent\non input.\n\n### hasExpireTime\n\n### setExpireTime\n\nTimestamp of when this resource is considered expired.\n\nThis is *always* provided on output, regardless of what was sent\non input.\n\n### getTtl\n\nInput only. The TTL for this resource. The expiration time is computed:\nnow + TTL.\n\n### hasTtl\n\n### setTtl\n\nInput only. The TTL for this resource. The expiration time is computed:\nnow + TTL.\n\n### getName\n\nImmutable. Identifier. The server-generated resource name of the cached\ncontent Format:\nprojects/{project}/locations/{location}/cachedContents/{cached_content}\n\n### setName\n\nImmutable. Identifier. The server-generated resource name of the cached\ncontent Format:\nprojects/{project}/locations/{location}/cachedContents/{cached_content}\n\n### getDisplayName\n\nOptional. Immutable. The user-generated meaningful display name of the\ncached content.\n\n### setDisplayName\n\nOptional. Immutable. The user-generated meaningful display name of the\ncached content.\n\n### getModel\n\nImmutable. The name of the `Model` to use for cached content. Currently,\nonly the published Gemini base models are supported, in form of\nprojects/{PROJECT}/locations/{LOCATION}/publishers/google/models/{MODEL}\n\n### setModel\n\nImmutable. The name of the `Model` to use for cached content. Currently,\nonly the published Gemini base models are supported, in form of\nprojects/{PROJECT}/locations/{LOCATION}/publishers/google/models/{MODEL}\n\n### getSystemInstruction\n\nOptional. Input only. Immutable. Developer set system instruction.\n\nCurrently, text only\n\n### hasSystemInstruction\n\n### clearSystemInstruction\n\n### setSystemInstruction\n\nOptional. Input only. Immutable. Developer set system instruction.\n\nCurrently, text only\n\n### getContents\n\nOptional. Input only. Immutable. The content to cache\n\n### setContents\n\nOptional. Input only. Immutable. The content to cache\n\n### getTools\n\nOptional. Input only. Immutable. A list of `Tools` the model may use to\ngenerate the next response\n\n### setTools\n\nOptional. Input only. Immutable. A list of `Tools` the model may use to\ngenerate the next response\n\n### getToolConfig\n\nOptional. Input only. Immutable. Tool config. This config is shared for all\ntools\n\n### hasToolConfig\n\n### clearToolConfig\n\n### setToolConfig\n\nOptional. Input only. Immutable. Tool config. This config is shared for all\ntools\n\n### getCreateTime\n\nOutput only. Creation time of the cache entry.\n\n### hasCreateTime\n\n### clearCreateTime\n\n### setCreateTime\n\nOutput only. Creation time of the cache entry.\n\n### getUpdateTime\n\nOutput only. When the cache entry was last updated in UTC time.\n\n### hasUpdateTime\n\n### clearUpdateTime\n\n### setUpdateTime\n\nOutput only. When the cache entry was last updated in UTC time.\n\n### getUsageMetadata\n\nOutput only. Metadata on the usage of the cached content.\n\n### hasUsageMetadata\n\n### clearUsageMetadata\n\n### setUsageMetadata\n\nOutput only. Metadata on the usage of the cached content.\n\n### getEncryptionSpec\n\nInput only. Immutable. Customer-managed encryption key spec for a\n`CachedContent`. If set, this `CachedContent` and all its sub-resources\nwill be secured by this key.\n\n### hasEncryptionSpec\n\n### clearEncryptionSpec\n\n### setEncryptionSpec\n\nInput only. Immutable. Customer-managed encryption key spec for a\n`CachedContent`. If set, this `CachedContent` and all its sub-resources\nwill be secured by this key.\n\n### getExpiration"]]