{"name":"@envelop/parser-cache","version":"5.0.5-alpha-20230214081259-b0c287aa","sideEffects":false,"peerDependencies":{"@envelop/core":"3.0.5-alpha-20230214081259-b0c287aa","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":"b0c287aa413db4585dbe578964ccc55c8e94dab5","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-20230214081259-b0c287aa","_nodeVersion":"18.14.0","_npmVersion":"9.3.1","dist":{"integrity":"sha512-xHyQeVcFsSVUdwcDtB5I9GVBCM/PUPt381rCfWQm1K9QFYpIXUSbNaB9LYNqUcPGxugOIPd09bjSqJFqmR5+cg==","shasum":"0af634fb9f27d85def5c66c2d10ad04e00835a12","tarball":"http://registry-npm.ywwl.com/@envelop/parser-cache/download/@envelop/parser-cache-5.0.5-alpha-20230214081259-b0c287aa.tgz","fileCount":7,"unpackedSize":6301,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDckSfSvbPxqh/YV7Ob3A0MjAwa8t8KVs0pzigmFnaFnwIgdr1yViVUYjj5DS7yjkeXUkd7LL3+6FUGDX1+A3ZTSd8="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj60K6ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqudg/8DWayZ6Or7FWlJKUNcpCAJn/dEnEtWdkySjmkymQEdjXltSDF\r\n+uR9zYPbh65mVoE64nU4QXXDPJUKCmLgtI1ZoEzs2Ryu9VhqiUgelc0TusZY\r\nvvtOglSPwWOdSYKtu01zQ6O+0o16HAQ6ZKaYkcPLMW8O8dnuhpSbIVif6dxX\r\nI70BH610AY5tZKG3z7qxa4Uf+CFhSnCMHsFF9sEsp05O44NYR+UsYg5Nvwo2\r\nmbV4dEpO5ajkDRedJ+jWsPMBMZBz3IYCL963c5qGysbDQxGLNncw3gc1KUXi\r\ndRw4rH9yU77Ydy3fGnaoLI5ZFYyNf6ckHhiOpH6XKxNKJdEOLq84HtsCDqvf\r\n92llG8QC40oUe+I+tWb7x1HX6c+F5cJpSd4+ai/KKzP6PICqIeWtSjlbwrLn\r\n2fZaAEnZBvcob4yH/ZcMm2+wUv3HDQb9naqOLWV6/VRzu6tzh/FTScqs9aJZ\r\ndAs1wAFmhj4XwnY4aX+lj1zM9qI1VhnCNZJEOLdGWxy5KvS0wYXzswPlc0ZJ\r\nKYt84XdO7zhhwsK8PzBrHr82m5UX1cExh3Ak9UhrYDr7Vi9oM12DHT+6ytPu\r\nZtzqG6cp2uQrlVAJE8l33MRUCb0+U+qHuIOyyQpmxDjqHyVpq4c1pGoYZiJI\r\n3QVXxjFSMOGrkWgg2QEdQkQ8qCMXGuMn0JE=\r\n=jj1h\r\n-----END PGP SIGNATURE-----\r\n","size":1779,"noattachment":false,"key":"/@envelop/parser-cache/-/@envelop/parser-cache-5.0.5-alpha-20230214081259-b0c287aa.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-20230214081259-b0c287aa_1676362425799_0.8504236962033522"},"_hasShrinkwrap":false,"publish_time":1676362425999,"_cnpm_publish_time":1676362425999,"dist-tags":{"alpha":"11.0.2-alpha-20261126100851-58d9782f151a975e802f1a545a315263d8d886a7","latest":"11.0.1","rc":"11.0.2-rc-20261124205929-9595907fc2bef8a397343bd288fef4685ab9f508"}}