Configuration for the schema validation.
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?: booleanWhether 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.
A middleware plugin that wraps an ICacheAdapter.
IMPORT_PATH: "@daiso-tech/core/cache/plugins"
Creates a plugin that validates cache values against a standard schema.
On
add,put, andupdateoperations the input value is validated against the provided schema before being stored. Optionally,getandgetAndRemoveoutputs can also be validated on retrieval to ensure data integrity.