Type Alias WithCacheSchemaSettings

WithCacheSchemaSettings: {
    schema: StandardSchemaV1;
    shouldValidateOutput?: boolean;
}

Settings for the withCacheSchema plugin.

IMPORT_PATH: "@daiso-tech/core/cache/plugins"

Type declaration

  • schema: StandardSchemaV1

    A standard-schema-compliant schema used to validate cache values. Compatible with libraries such as Zod, ArkType, Valibot, and others that implement the StandardSchemaV1 specification.

  • OptionalshouldValidateOutput?: boolean

    Whether to validate values returned by get and getAndRemove on retrieval, in addition to validating values on write. When true, malformed data in the cache is caught at read time rather than silently returned.

    true