[]previous and next page

KeyValueCacheStoreOptions

Options of createKeyValueCacheStore.

Options of createKeyValueCacheStore.

Import#

ts
import type { KeyValueCacheStoreOptions } from "@shadow-js/dusk/server";

Signature#

ts
interface KeyValueCacheStoreOptions {
  /** Prefix of every key the store writes. Default `"shadow:isr:"`. */
  readonly prefix?: string;
  /** Epoch milliseconds now; used to turn an entry's `staleUntil` into a key lifetime. Default `Date.now`. */
  readonly now?: () => number;
}

Members#

Name Type Description
prefix? readonly prefix?: string Prefix of every key the store writes. Default "shadow:isr:".
now? readonly now?: () => number Epoch milliseconds now; used to turn an entry's staleUntil into a key lifetime. Default Date.now.