{"name":"@envelop/parser-cache","version":"5.0.3","sideEffects":false,"peerDependencies":{"@envelop/core":"^3.0.3","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"},"gitHead":"a11a876863dd760b9afebcecc41d9002f3a943c6","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.3","_nodeVersion":"18.12.0","_npmVersion":"8.19.2","dist":{"integrity":"sha512-3H3PZI//1ConuD0MmkKl3Sm9j7vRQvI/fIgvzXbE0n/OuuVV7D9rmtnSEqTkXufAgxKv674T2DJF4QPQHOy9Ag==","shasum":"14f28a85d5986dee3911473961c91df7e5188ccc","tarball":"http://registry-npm.ywwl.com/@envelop/parser-cache/download/@envelop/parser-cache-5.0.3.tgz","fileCount":7,"unpackedSize":6242,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDvUzy2JcqH9/AMp6xK+SGyLDcsyFwso4Bf7IIWR4fplAiBkUCm0lV9N6AKs/sWEXu5W+pdct5PrWv2ELRVqcI1Tkw=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjWwaqACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrUGA//WJPIMVOvyj+TmWSHeAXd05c36WJpQOkx1k+QBPuPzvh/zuam\r\nvewMcoa1HV0UBrSYj6y/ZtfNiMNrHIhdDGdBmKCAtw8bV2UIlbFM/3FcDf0B\r\nTkSinoun4xgUzdSQhrvByiGZFJ8dYXOmXaHICT5glzhv1vsHF4x/nuZ12w1Y\r\n0VWNcDzmQviIk6oT3cHcRSQTJdBue9FeCOoKfZ9HvRDcpEtDp9fgmshS6eKp\r\ng1pmrXho2H6XTiH0Ek0++3x1+mTdzNYvw6EjjGC2NbbOADBGhp2g8LLWWUAd\r\nbFXpCaYJ/VmUrcHbNQ158OYSbAti0QUVisO2XRka4D3Wv6I0tY9cBx25HIOi\r\nFRTffk872gS6tNbxH6teM6r6FKOWjFW6N2hh2BJtZKJXxHk8+Z+f/yzHi45P\r\nWCifEhTJeQc3FEEFh2U6HxplUT+KhN85ORdxWy6RIrux/mEty3Z/Mzk1yYcK\r\nI8x2WuSw6zeA+4ZFuSKfIAE+lKv57CZLp9JbfCoTlfdCmoJXG0JUZ9MQYJKi\r\nvy6Z4wgIjHceJrg4UtUOCkA7K3woIHAshiy3P2VpRN27MHQjtUWiV2r/ovaB\r\nYLDgtDG2V2mWpFlFtx3lrVbSKu5zedzmGC/q9Asa9qbSp1SMe1293jB1SM7B\r\nF73xP2VrsO/xhwtPhn30j/FXdLf63NvJP9M=\r\n=D4KX\r\n-----END PGP SIGNATURE-----\r\n","size":1750,"noattachment":false,"key":"/@envelop/parser-cache/-/@envelop/parser-cache-5.0.3.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.3_1666909866383_0.6544257745168307"},"_hasShrinkwrap":false,"readme":"## `@envelop/parser-cache`\n\nThis plugins adds simple LRU caching to your `parse`, to improve performance by caching the parsed\nresult.\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 { execute, parse, specifiedRules, subscribe, validate } 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\nusing 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\ndefault `max` and `ttl`.\n","publish_time":1666909866491,"_cnpm_publish_time":1666909866491,"dist-tags":{"alpha":"11.0.0-alpha-20261019231601-b21e6cedc1a444383d9ce69fe6180f5b4ff67120","latest":"11.0.0","rc":"11.0.0-rc-20261022165416-7c29decb398764e6ac3915e1c539c478cbf19237"}}