Skip to content

CachePointBlock

Defined in: src/types/messages.ts:755

Cache point block for prompt caching. Marks a position in a message or system prompt where caching should occur.

new CachePointBlock(data): CachePointBlock;

Defined in: src/types/messages.ts:772

ParameterType
dataCachePointBlockData

CachePointBlock

readonly type: "cachePointBlock";

Defined in: src/types/messages.ts:759

Discriminator for cache point.


readonly cacheType: "default";

Defined in: src/types/messages.ts:764

The cache type. Currently only ‘default’ is supported.

CachePointBlockData.cacheType


readonly ttl?: string;

Defined in: src/types/messages.ts:770

Optional TTL for the cache entry. See CachePointBlockData.ttl for the provider-specific value space.

CachePointBlockData.ttl

toJSON(): {
cachePoint: CachePointBlockData;
};

Defined in: src/types/messages.ts:783

Serializes the CachePointBlock to a JSON-compatible ContentBlockData object. Called automatically by JSON.stringify().

{
cachePoint: CachePointBlockData;
}
NameTypeDefined in
cachePointCachePointBlockDatasrc/types/messages.ts:783

JSONSerializable.toJSON


static fromJSON(data): CachePointBlock;

Defined in: src/types/messages.ts:798

Creates a CachePointBlock instance from its wrapped data format.

ParameterTypeDescription
data{ cachePoint: CachePointBlockData; }Wrapped CachePointBlockData to deserialize
data.cachePointCachePointBlockData-

CachePointBlock

CachePointBlock instance