{"name":"@envelop/parser-cache","version":"5.0.6-alpha-20230218015354-1730a4ac","sideEffects":false,"peerDependencies":{"@envelop/core":"3.0.6-alpha-20230218015354-1730a4ac","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":"1730a4ac53d1e618156564a97e306f9692ce1414","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-20230218015354-1730a4ac","_nodeVersion":"18.14.0","_npmVersion":"9.3.1","dist":{"integrity":"sha512-FYmjQsa4DdZDTZQoBYhsWDwmVfwyEZ1DY3PvIigXSP/mA681UFm3C04HrAwUjK2JEZeVDawiWMlxs7QpN97sFA==","shasum":"93ced8d430daead0d6e51506bd763801373cd829","tarball":"http://registry-npm.ywwl.com/@envelop/parser-cache/download/@envelop/parser-cache-5.0.6-alpha-20230218015354-1730a4ac.tgz","fileCount":7,"unpackedSize":6301,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDr9KF/SjsMS0g3sely1JxxYqkrh7z7gGxXxh5eUMwWmQIhANjJj07HPjcW+9TWEmCQcId47ITHPAS1RDCM6EVfjRbz"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj8C/lACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmre6w//WyOoYMijRf4OQn9/i7LmAi9PUi1mct265bNq98QyUQM/j33I\r\n0Wb5sCZPdTSZuQVTKM9CDVnGoWxlO/3QWSiQHnIpmAklTNIdJbqwiOQGQYgL\r\n+Gz5Zb2vth/8gxtvPSQg2+8qA9m7wbqFxUDmROJwXxYMIzJTi4xj1tkWVRyB\r\n6uTzi0nd1sFSD/jqUNK2Hbz0WZBtUG9Tx9Vr2XKovoY3OrJMmFogMpetisb3\r\nUYRHXd1eEfQB4MXcWo2BOq0YZdsxRzQug3qHCBzVKHi2r9+9rc52jppftoh8\r\nKLNMOc15naYEmzw0RQk2Wc9SUEB41cKCZaiC2vC3ZgO7odAXn7091fCD21Qy\r\nNSfdP1ZNS6C0heTZqKNqM86opwG81fvHoN/Utimi1DfBU+andTN+4/RyyovE\r\n1/PqMV33Rg1kK3iBmfv2DtLxLNbdUEpWKDT2sC4QJxe/EAoaGuILxOAuFR3x\r\nEx+EKouRGfDOFLWkUaGbh8PGZzdo05tRWdmclv/QOdP+M//EowT2LmTEm1h3\r\nkDS0nyfwLEHS0gshWVxbD5/18O17Zak0U4b/qXrCJdBd/MlE7h/Y5OmzMDuz\r\nuQSNyWR2YqefM2IuNpuk9YyxT+KxZI5t7VhDrGw/J1aX7dvZtK6488eKJZxE\r\nfv+qnp13sV7f4cSqU+hKrJk1+GF5rmy21a4=\r\n=tM2f\r\n-----END PGP SIGNATURE-----\r\n","size":1777,"noattachment":false,"key":"/@envelop/parser-cache/-/@envelop/parser-cache-5.0.6-alpha-20230218015354-1730a4ac.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-20230218015354-1730a4ac_1676685285773_0.47794847281144826"},"_hasShrinkwrap":false,"publish_time":1676685285921,"_cnpm_publish_time":1676685285921,"dist-tags":{"alpha":"11.0.2-alpha-20261126100851-58d9782f151a975e802f1a545a315263d8d886a7","latest":"11.0.1","rc":"11.0.2-rc-20261124205929-9595907fc2bef8a397343bd288fef4685ab9f508"}}