property CacheMiddlewareOptions.key

Custom cache key generator. Defaults to ${request.method}:${request.url}.

The tenant discriminator segment is composed around this key too, so a tenant-aware application stores one entry per tenant regardless.

Type

(ctx: IRequestContext) => string

Usage

import { type CacheMiddlewareOptions } from "cache-plugin/src/index.ts";