Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@envelop/parser-cache

Package Overview
Dependencies
Maintainers
1
Versions
1280
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@envelop/parser-cache

This plugins adds simple LRU caching to your `parse`, to improve performance by caching the parsed result.

  • 0.2.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

@envelop/parser-cache

This plugins adds simple LRU caching to your parse, to improve performance by caching the parsed result.

This plugins improves performance of parsing by ~60% (based on benchmarks).

Getting Started

yarn add @envelop/parser-cache

Usage Example

import { envelop } from '@envelop/core';
import { useParserCache } from '@envelop/parser-cache';

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

API Reference

max

Set this to configure your maximum amount of items in the LRU cache. The default is 1000.

ttl

Set this to configure the TTL (time to live) of items in the LRU cache. The default is 3600000.

FAQs

Package last updated on 12 Jul 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc