{"name":"@envelop/parser-cache","version":"5.0.6-alpha-20230218000752-bec5a764","sideEffects":false,"peerDependencies":{"@envelop/core":"3.0.6-alpha-20230218000752-bec5a764","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":"bec5a764475d656ab2d776806bda9d40930d2654","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-20230218000752-bec5a764","_nodeVersion":"18.14.0","_npmVersion":"9.3.1","dist":{"integrity":"sha512-GDBzRRVG3rRKuyBJZwaP0/73K31yRbsS2HlrHdLhKpH1MFr0aylXvWoLpVQxjD99wzvMA79AWiP0g0vmv8SJ/A==","shasum":"f1ef5542428ae6ef45dd703036ac7415a2ab57fd","tarball":"http://registry-npm.ywwl.com/@envelop/parser-cache/download/@envelop/parser-cache-5.0.6-alpha-20230218000752-bec5a764.tgz","fileCount":7,"unpackedSize":6301,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDMBIAzDjQt4hgxGb02LmqhjJlZRmUj4AhJDJ7Dm9eZVgIhAPsCQreE1G8cTJwK/aJ7pPOhNs0ElUi9UEnN5nA/ZtHn"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj8BcTACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrMdw/+PwyE4rZSR7xNKy79/W0+X7jdVd/wuJozZR9ncmNBRahYOHb0\r\nBN037W7QSikmsGKtcx64N6/Nnze6HfEquU2J0IWCX18dy/zIFRAbHEFQqaDU\r\nLOozIRSv5osvAoma/bG+aVUXugSyc5DezNh8RwkLyy0mmiv4q7p1BJB87nqo\r\nLNwHtqoyMLpXNTn5xc6NUn/SD+RJs+13DI5e3H9qikt1rDw8/5yp045/ynz/\r\n9uOPXtfa2bNBEJWWY83YwU/EfVwv+uhfPmMZoceSey9F/yK91lmgOTs2vJO3\r\ncrplQ9ZHQtLKk2+2lQGPE3f+GW/g/JUekyykErJvJVdhYwfSBajTW9/GK7fO\r\nWO3bCb72WqSwVNSUN13u79Nv+eAneYkJFTa8IH1HYD/J/oTUN6Lz299sx4gX\r\novKSpA8M5ox8oE0lnkNGP7hWntjcFV2lGtklqgE/TD91rvdUWpDykCsdiu40\r\niesR5Vrt5nehiTwsSCrHMqXs7zUZRmiI0dgijZ55o9NOWNIfcdLzKBQTyAXS\r\n6xoWvDYP85j54gnmdMQ7JxABRjx5ptypdDc+cXvI79KbhqNO/bYIYl1ySKBS\r\n2PtpW7f3YnfZKg6DF2MaUFxjJhnSfyNUpY6zFN92DH8SNSy7u9IFktPbdln1\r\nbm7tJkweyG8MufxNginD3o7L+dMOqEhcxfo=\r\n=WTyt\r\n-----END PGP SIGNATURE-----\r\n","size":1776,"noattachment":false,"key":"/@envelop/parser-cache/-/@envelop/parser-cache-5.0.6-alpha-20230218000752-bec5a764.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-20230218000752-bec5a764_1676678931731_0.7807452986368251"},"_hasShrinkwrap":false,"publish_time":1676678931890,"_cnpm_publish_time":1676678931890,"dist-tags":{"alpha":"11.0.2-alpha-20261126100851-58d9782f151a975e802f1a545a315263d8d886a7","latest":"11.0.1","rc":"11.0.2-rc-20261124205929-9595907fc2bef8a397343bd288fef4685ab9f508"}}