Skip to content

ExtensionCache

A run-to-run cache, where the host offers one.

Exists so a source can avoid re-fetching an unchanged sub-resource — show notes, a transcript page — across scheduled runs. Values are strings; a source that wants structure serialises it.

get(key: string): Promise<string | null>;

The cached value, or null on a miss.

ParameterType
keystring

Promise<string | null>


put(
key: string,
value: string,
ttlSeconds: number): Promise<void>;

Store a value for at most ttlSeconds. The host may shorten it.

ParameterType
keystring
valuestring
ttlSecondsnumber

Promise<void>