@envelop/validation-cache
This plugins adds simple LRU caching to your `validate`, to improve performance by caching the validation result.
Last updated 5 years ago by dotansimha .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install @envelop/validation-cache 
SYNC missed versions from official npm registry.

@envelop/validation-cache

This plugins adds simple LRU caching to your validate, to improve performance by caching the validation result.

This plugins improves performance of validating by ~50% (based on benchmarks).

Getting Started

yarn add @envelop/validation-cache

Usage Example

import { envelop } from '@envelop/core';
import { useValidationCache } from '@envelop/validation-cache';

const getEnveloped = envelop({
  plugins: [
    // ... other plugins ...
    useValidationCache({
      // options goes here
    }),
  ],
});

API Reference

cache

Set this to pass in a cache instance. By default a new LRU cache is created using default max and ttl.

Current Tags

1958 Versions

Maintainers (1)
Downloads
Total 303
Today 0
This Week 61
This Month 203
Last Day 3
Last Week 16
Last Month 100
Dependencies (0)
None
Dev Dependencies (0)
None

© 2010 - cnpmjs.org x YWFE | Home | YWFE