{"name":"@envelop/parser-cache","version":"5.0.5-alpha-20230212062644-e404badf","sideEffects":false,"peerDependencies":{"@envelop/core":"3.0.5-alpha-20230212062644-e404badf","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":"e404badf1f5ecf0a0ec14aafa555ca0297c35630","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-20230212062644-e404badf","_nodeVersion":"18.14.0","_npmVersion":"9.3.1","dist":{"integrity":"sha512-EujZFY4oTEfME78wK9N8p43RYhZ7PKhuK7ycdYKdzQfPIZ5yL87pSiShg97tfA/FG/PSs20PAevywPp8hlsbIw==","shasum":"a4f8b8a5e2dcb4b85568d00ca47e747b45ce8573","tarball":"http://registry-npm.ywwl.com/@envelop/parser-cache/download/@envelop/parser-cache-5.0.5-alpha-20230212062644-e404badf.tgz","fileCount":7,"unpackedSize":6301,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB8X3io9efcR0UYbjfJh3zr7W2HcA0uadiTR0DpxS2RtAiEAjWUJvneFLJFEFCyCoNUrorZT5eqKBzSa0q+v+DY4F5U="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj6IbUACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr7kQ//VUv0ZOIBQr9/DmLzfz1+LSjlDhu4pE2GK4gfeSjs0EFZZ90P\r\n8kPYjMD8Hq9/niSmirrd6pq3km6jZeB98aJRuZ1GIqoaNQDWqXZs5lw+SpJt\r\nHVyUb9fRyRzc8zTq4QXR85i7DS0X5hyBbm0BCcP7I+9gkBU6FTKtloV64ebd\r\nBUSg7h3qoY4eKaKhC8aPgpmVrfgb1DoNO1RB2kX8Kd32pZH8XwhtRaY2SQVk\r\nn1aOZOzXx4wQJpSuH6YCFL21E0YBXJQjC4f4e+Ctha2gsHbZfz7ywCjzP4ou\r\nDzNJDErnPWlkVL3pCv/SEfn6hEm392mSHCOWo6P3j9cxksCq1BX+YRcG6nPP\r\nUdJ6DB02zcgsRbydyb/l3xJSxNqQ+XULQvorA1QIfnAHnzZB03lIklPEYIYF\r\nn56XMi4qJNdPBxmD7GqXgxNcoUgu1znxOk+72ClomUaPqqsLhW1I4xbe4rSN\r\ntB1X8O0+GduxOT3Dzb1hcBsTjcrOYOvef9HPg29f2hk8FXVz0hywsp7nFvkC\r\nLPwo1d6AZKc/PergNaCI+Ihyryu77xh5OrXOrub6Qzuh5uQbRvxR+pEhCbYV\r\nvk9C4aOiR9FseeswJbUxPdX4Yjcy1JH9oJ1TOpjxyxo+Em6GM2cQrKID0H2d\r\ntiKce84Rrgd7YXQv5ZU48zVtGz4UgSDKDUM=\r\n=FLSx\r\n-----END PGP SIGNATURE-----\r\n","size":1776,"noattachment":false,"key":"/@envelop/parser-cache/-/@envelop/parser-cache-5.0.5-alpha-20230212062644-e404badf.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-20230212062644-e404badf_1676183251960_0.4137695628362148"},"_hasShrinkwrap":false,"publish_time":1676183252130,"_cnpm_publish_time":1676183252130,"dist-tags":{"alpha":"11.0.2-alpha-20261126100851-58d9782f151a975e802f1a545a315263d8d886a7","latest":"11.0.1","rc":"11.0.2-rc-20261124205929-9595907fc2bef8a397343bd288fef4685ab9f508"}}