{"name":"@envelop/parser-cache","version":"5.0.6-alpha-20230217211208-edb4853e","sideEffects":false,"peerDependencies":{"@envelop/core":"3.0.6-alpha-20230217211208-edb4853e","graphql":"^14.0.0 || ^15.0.0 || ^16.0.0"},"dependencies":{"lru-cache":"^6.0.0","tslib":"^2.5.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":"edb4853eff6802411eac809384759a387d498f8e","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.6-alpha-20230217211208-edb4853e","_nodeVersion":"18.14.0","_npmVersion":"9.3.1","dist":{"integrity":"sha512-CIod33U8UN/Oy/QYwSjZIQILAbOdr9bLslMP8IhMUSlkD1OiJ05hg4q+LAtvBOCpERRw8Rz8L2YlICydsZFvgw==","shasum":"000831b280d34d23ae3e9de23081bd48254a17ee","tarball":"http://registry-npm.ywwl.com/@envelop/parser-cache/download/@envelop/parser-cache-5.0.6-alpha-20230217211208-edb4853e.tgz","fileCount":7,"unpackedSize":6301,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBZbobmOLL2E4qcdqBVDrchgkgbkDYdkCCCJXwWDpp8jAiALRAKKirU8hhRDwxgIxD+oeDKDpvrMxd1jJo5rUnsyyA=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj7+3uACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp/dQ/+JBqyro/S2Dag9wDCD1XLTKVJPvnLcb2I1B4Mf2I8xHkDdcJN\r\nI/uq1WPQjeph5cBgkaCjDlRrAi/y5G2QOybAWV3MUPhq1mhnKkMVSwOFmfJS\r\nSf4yDRAO7yjT2ySxv1lPyNeRmDweh1fa0mpSWPPibL+7TUBm4n7PkJ2iWAwK\r\nju4yYYZa9cZ6Tayr9QefGjauuso/WkFMV7ysN3uNmHZZkA1gmC743SCo4c2b\r\nXqdbnj5UK1iewDzyqx/4meD4/l3uIONZ4w4ixxAkqeD3jsJBh8X2uWs4fV+N\r\nZkRUrks2bopZAlzwpSiUlMoxFAJeUYogBUy0LYFWEcA/AkZHFAZXbF8Ok6Zz\r\nCiDXGz4+okCwLc/jeNGZPoMAdckWf2cZNMItR86TeaHNNIhBwk3g2BHXVyt7\r\nVaDNpnYTYcDZC3kdkzXoOtWOU41NE9RL4yY7zL7DHiTfkhXbMnBYPCXf/h9v\r\nwXIu1WKRLQ3Ccg9fiSs6mF8ZkxjX/7omj8tIaG5JcT58uXIBRM27dRqvi/Rh\r\nCQTmkfgNdhahf8QYocQOeRH1tkN0I9GefRmbmv4BliF/v9n+n9c5o/FOKHA0\r\nXNaP6gFcTio/rM8KAD63qgn1UGdPESxnQLKW4IOBwToyDjopkhu1y0AKhVbd\r\nBqkGjaaRTu1kLA5iDIm6F0FDUCuLXDXwOJg=\r\n=XSKk\r\n-----END PGP SIGNATURE-----\r\n","size":1776,"noattachment":false,"key":"/@envelop/parser-cache/-/@envelop/parser-cache-5.0.6-alpha-20230217211208-edb4853e.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.6-alpha-20230217211208-edb4853e_1676668398799_0.6756573587097754"},"_hasShrinkwrap":false,"publish_time":1676668398945,"_cnpm_publish_time":1676668398945,"dist-tags":{"alpha":"11.0.2-alpha-20261126100851-58d9782f151a975e802f1a545a315263d8d886a7","latest":"11.0.1","rc":"11.0.2-rc-20261124205929-9595907fc2bef8a397343bd288fef4685ab9f508"}}