Skip to content

CacheApiCacheStore

Defined in: src/adapters/cloudflare.ts:48

Response cache backed by the Cloudflare Cache API.

new CacheApiCacheStore(cache?, origin?): CacheApiCacheStore

Defined in: src/adapters/cloudflare.ts:56

Cache

A Cache instance (e.g. caches.default). Falls back to caches.default when omitted.

string

Synthetic origin used to construct cache keys. Default: "https://edge-gateway.internal".

CacheApiCacheStore

delete(key): Promise<boolean>

Defined in: src/adapters/cloudflare.ts:84

Delete a cached entry. Returns true if something was removed.

string

Promise<boolean>

CacheStore.delete


get(key): Promise<Response | null>

Defined in: src/adapters/cloudflare.ts:62

Retrieve a cached response by key. Returns null on miss.

string

Promise<Response | null>

CacheStore.get


put(key, response, ttlSeconds): Promise<void>

Defined in: src/adapters/cloudflare.ts:68

Store a response under key with a TTL in seconds.

string

Response

number

Promise<void>

CacheStore.put