{"name":"@envelop/parser-cache","version":"5.0.5-alpha-20230211203128-ae1d931b","sideEffects":false,"peerDependencies":{"@envelop/core":"3.0.5-alpha-20230211203128-ae1d931b","graphql":"^14.0.0 || ^15.0.0 || ^16.0.0"},"dependencies":{"lru-cache":"^6.0.0","tslib":"^2.4.0"},"repository":{"type":"git","url":"git+https://github.com/n1ru4l/envelop.git","directory":"packages/plugins/parser-cache"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"cjs/index.js","module":"esm/index.js","typings":"typings/index.d.ts","typescript":{"definition":"typings/index.d.ts"},"type":"module","exports":{".":{"require":{"types":"./typings/index.d.cts","default":"./cjs/index.js"},"import":{"types":"./typings/index.d.ts","default":"./esm/index.js"},"default":{"types":"./typings/index.d.ts","default":"./esm/index.js"}},"./*":{"require":{"types":"./typings/*.d.cts","default":"./cjs/*.js"},"import":{"types":"./typings/*.d.ts","default":"./esm/*.js"},"default":{"types":"./typings/*.d.ts","default":"./esm/*.js"}},"./package.json":"./package.json"},"readme":"## `@envelop/parser-cache`\n\nThis plugins adds simple LRU caching to your `parse`, to improve performance by caching the parsed result.\n\nThis plugins improves performance of parsing by ~60% (based on benchmarks).\n\n## Getting Started\n\n```\nyarn add @envelop/parser-cache\n```\n\n## Usage Example\n\n```ts\nimport { parse, validate, specifiedRules, execute, subscribe } from 'graphql'\nimport { envelop, useEngine } from '@envelop/core'\nimport { useParserCache } from '@envelop/parser-cache'\n\nconst getEnveloped = envelop({\n  plugins: [\n    useEngine({ parse, validate, specifiedRules, execute, subscribe }),\n    // ... other plugins ...\n    useParserCache({\n      // options goes here\n    })\n  ]\n})\n```\n\n### API Reference\n\n#### `documentCache`\n\nSet this to pass in a cache instance for caching documents. By default a new LRU cache is created using default `max` and `ttl`.\n\n#### `errorCache`\n\nSet this to pass in a cache instance for caching errors. By default a new LRU cache is created using default `max` and `ttl`.\n","readmeFilename":"README.md","gitHead":"ae1d931ba74f7aac0bbb4e7497c6f13323977193","description":"This plugins adds simple LRU caching to your `parse`, to improve performance by caching the parsed result.","bugs":{"url":"https://github.com/n1ru4l/envelop/issues"},"homepage":"https://github.com/n1ru4l/envelop#readme","_id":"@envelop/parser-cache@5.0.5-alpha-20230211203128-ae1d931b","_nodeVersion":"18.14.0","_npmVersion":"9.3.1","dist":{"integrity":"sha512-ZspNGvNOaRGZVgjviR3HF6wshBSJiLyT82cZ6ex/S8F1iZkAWFWUKtphqCo2gAFOl7cJTslLXBFd1lNc8rBmwg==","shasum":"d9360871cfb79ebd6d9fdf00a0cc9afc98a2658e","tarball":"http://registry-npm.ywwl.com/@envelop/parser-cache/download/@envelop/parser-cache-5.0.5-alpha-20230211203128-ae1d931b.tgz","fileCount":7,"unpackedSize":6301,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCieO5yn3763+qdjt0jeQcE5cXXdKZtFWASXPKzyHl6kgIgOUOAV6felmbCQnD1W8y8JLoMA+RIuORNG13OZqV1/bw="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj5/tNACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrhSg//ehUuW3DonbwNMJzPZFD72dhve7qZPsFugjNY6LYfl1B4QKJ1\r\nOtSLOXs9tiOW4LFjhfC/ljaWSNtGYPBDsRDC7rckP6DXXKrB715MsHEnhE9Q\r\nwgWLBnNPX42SB60hZA4Tboxa1fAIjWLLqU8iQhKiqne6TCxK1exyZkOYEJgi\r\n6Aou02Xg6lgPdK6SWhPUuedbsjEFJz4lIvb2GWj/ZXn8cuEMWiiX78+Gmkbb\r\nUnJj8qa0kVJBE/pDBNLnNMOu0dfWvaLfhrZgDGWTbZqez+G4HzHeqHDQl7ZM\r\nklmRYn/CGQEeJvsgddRa5iZJ6AknceBW2/14/tMuEFc2+EUpxkwBlDEwKfFL\r\nJ+00JDWDKd+sDOh16UGa+2VjKNgTsdlxezyHfnL/6LHNywbtOS8el+uRo+AH\r\nDfKbQq3cDRX7RKTU1fUulkfcsm1VZzk5L63mN3Q/GhZGfWasmQN9DdjMaap8\r\nss73HrWi6nw8/2lVBRfb/CfFWSyK5R2JQ9Pm/VO02amJGWXIZ8vKGA7BneIN\r\naWW4+zI5z9CaT5NjH3qnBvvCaJh4poINZdngf9MZuJ5RRtR+ULm+3unJY0iN\r\nz8z6jzpsfwN5FHYfLzs2ViDXMJtGutUbqeai27Wa4N6plX+tb29XXMlmR9fd\r\nbl9u8KYpV8IIG9/2JcWXJNhRxtN9sbClRyo=\r\n=4bX/\r\n-----END PGP SIGNATURE-----\r\n","size":1777,"noattachment":false,"key":"/@envelop/parser-cache/-/@envelop/parser-cache-5.0.5-alpha-20230211203128-ae1d931b.tgz"},"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/parser-cache_5.0.5-alpha-20230211203128-ae1d931b_1676147533460_0.9119766375041967"},"_hasShrinkwrap":false,"publish_time":1676147533666,"_cnpm_publish_time":1676147533666,"dist-tags":{"alpha":"11.0.2-alpha-20261126100851-58d9782f151a975e802f1a545a315263d8d886a7","latest":"11.0.1","rc":"11.0.2-rc-20261124205929-9595907fc2bef8a397343bd288fef4685ab9f508"}}