packages/functions/docs/interfaces/index.RuntimeCache.md
index.RuntimeCache
Interface representing the runtime cache.
• delete: (key: string) => Promise<void>
▸ (key): Promise<void>
Deletes a value from the cache.
| Name | Type | Description |
|---|---|---|
key | string | The key of the value to delete. |
Promise<void>
A promise that resolves when the value is deleted.
packages/functions/src/cache/types.ts:11
• expireTag: (tag: string | string[]) => Promise<void>
▸ (tag): Promise<void>
Expires cache entries by tag.
| Name | Type | Description |
|---|---|---|
tag | string | string[] | The tag or tags of the cache entries to expire. |
Promise<void>
A promise that resolves when the cache entries expiration request is received.
packages/functions/src/cache/types.ts:44
• get: (key: string) => Promise<unknown>
▸ (key): Promise<unknown>
Retrieves a value from the cache.
| Name | Type | Description |
|---|---|---|
key | string | The key of the value to retrieve. |
Promise<unknown>
A promise that resolves to the value, or null if not found.
packages/functions/src/cache/types.ts:19
• set: (key: string, value: unknown, options?: { name?: string ; tags?: string[] ; ttl?: number }) => Promise<void>
▸ (key, value, options?): Promise<void>
Sets a value in the cache.
| Name | Type | Description |
|---|---|---|
key | string | The key of the value to set. |
value | unknown | The value to set. |
options? | Object | Optional settings for the cache entry. |
options.name? | string | Optional user-friendly name for the cache entry used for o11y. |
options.tags? | string[] | Optional tags to associate with the cache entry. |
options.ttl? | number | Optional time-to-live for the cache entry, in seconds. |
Promise<void>
A promise that resolves when the value is set.