method IKvNamespace.put
IKvNamespace.put(
key: string,
value: string,
options?: KvPutOptions
): Promise<void>

Writes a value.

Parameters

key: string

The key, at most 512 bytes

value: string

The value, at most 25 MiB

optional
options: KvPutOptions

expirationTtl is in seconds and has a platform minimum of 60; a smaller value is rejected by KV

Return Type

Promise<void>

Usage

import { type IKvNamespace } from "cloudflare-plugin/src/index.ts";