{"name":"@envelop/parser-cache","version":"5.0.5-alpha-20230210135507-d42b83cd","sideEffects":false,"peerDependencies":{"@envelop/core":"3.0.5-alpha-20230210135507-d42b83cd","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":"d42b83cda1145c23625c0e3e12f900b17e1fea24","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-20230210135507-d42b83cd","_nodeVersion":"18.14.0","_npmVersion":"9.3.1","dist":{"integrity":"sha512-UZ8CP39aHBCFfw9tAnWmKj10AzWAhqfSLRcFt7Zagt/5DBk0nuRYZ3h6aQSr9h71sZm1lPzlJp9bo8wH6C94ZA==","shasum":"d53f3ab615d6640dc23955bec13e04df68f5f81f","tarball":"http://registry-npm.ywwl.com/@envelop/parser-cache/download/@envelop/parser-cache-5.0.5-alpha-20230210135507-d42b83cd.tgz","fileCount":7,"unpackedSize":6301,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBxvYF12uK/CFZrZlWDW8BGDXqNXW14/kjoGO+bfrax+AiBQNgNt6wIwFK93J2x/3+bN4eI9yhj/RvDgAmJxe6Fx6Q=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj5kzoACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr5VQ/8DFIaPAO73owZ28ldOQ1KjiuUTfXchXz8h3Gx+fptSeACjJZR\r\nillJq3BhBVYw1Ls+p8dT+XmtqzEHWuKB1dLb+GFuePQGVHlWoD/JxsMGzCpX\r\n/vb1M8dyE858tnVcNLBdGbTNd+aRfNd9IS44yBfkRdurW8jBPxLtASKGjS+B\r\n7pT2g4dgaVt2h/kwc0AiVXyCUp+7XXkUxP/TLFCxKCj1UT4e+IXDDSPqRLCs\r\nfLAi2nQd/3/RQG65lYfld57g9JEXHkzuJmX/o8/D/RXGNqlHlL5whnA+EbO6\r\nxfhvqr/xIGhuKndpSgd2DZn1+nA0EbRwJNPJ1ux1ZEqWmEwCSKWqwMQYdFIw\r\nZ6rwJtAMBti5/0olY/VkZutuOjF4EKW9G7xivtuxKxcqS5d++5LtqcVdctfr\r\n5EHJbh8sMityIV2KDuBcgv9zxHsAcf8BSznVErzRzEdj4UMjOUsB8n+YCA4Z\r\nEdO35A09pUOv68nF2OXhhXuIZoqmKtuYm3L7JpDWc4wx9bGQHh31RvJ9tiPO\r\nkLOdsfb53+LIglR2yzJmKeHordSOucXQ8n/5Fv4Wd+PkziEWzHZZPgkZv0C6\r\nths75oYLgK6BBoq8Z3xVGoOEoxgSAEmg5gTxdCSdwgMzuffxL+4g4hlIEY2E\r\nzYbobiwnhiVSLginBhK8FCwEYy0vLp2LNZk=\r\n=ryoA\r\n-----END PGP SIGNATURE-----\r\n","size":1777,"noattachment":false,"key":"/@envelop/parser-cache/-/@envelop/parser-cache-5.0.5-alpha-20230210135507-d42b83cd.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-20230210135507-d42b83cd_1676037352005_0.32508072953278333"},"_hasShrinkwrap":false,"publish_time":1676037352140,"_cnpm_publish_time":1676037352140,"dist-tags":{"alpha":"11.0.2-alpha-20261126100851-58d9782f151a975e802f1a545a315263d8d886a7","latest":"11.0.1","rc":"11.0.2-rc-20261124205929-9595907fc2bef8a397343bd288fef4685ab9f508"}}