{"name":"@envelop/parser-cache","version":"5.0.5-alpha-20230211213705-37afd04b","sideEffects":false,"peerDependencies":{"@envelop/core":"3.0.5-alpha-20230211213705-37afd04b","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":"37afd04bed2a3530d2e9103b799c80483812c10b","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-20230211213705-37afd04b","_nodeVersion":"18.14.0","_npmVersion":"9.3.1","dist":{"integrity":"sha512-RZ3/Yc/b06R4nEN8fa76wI0u1p4u7FDRCUATw3MG5yifC1PO2YVSi9rPRA8e0S/dL8njx0WyYRtrAqyE4amgog==","shasum":"11e485b4a550cd3f1d2daada2c0451ed4e913fc5","tarball":"http://registry-npm.ywwl.com/@envelop/parser-cache/download/@envelop/parser-cache-5.0.5-alpha-20230211213705-37afd04b.tgz","fileCount":7,"unpackedSize":6301,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICJDQ9YW8YbUWrVZgM2w8xiHY7BHVYm1dUUrxUJxA/2hAiBkx5pjT49KgkSQ7R7HkP8iMNiLrX2WXrwkCPMQ4sfdNg=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj6AqzACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoAKRAAo8xU02W5zN7HReFh9LfhpvMdmpf7lI3kShc7zWRkOZkD5Yo2\r\nXA1LDeN6x0ds5AcWn5EQdAp3SrrXkT569avYVSiwycqoUM0tT8Dk3iDswNDh\r\ntVCrsErzmVHcl8T5YKJ5JayL38sTt0ttIw0Z0T3M8liLgrmbN7xhgKqJwMZ9\r\nvC1pXC5Qzd82kd7q0SQmQbwGua8CYFoIV5WrIac0PIcUzVw0o/TmHpcP7e+I\r\npb7PKxQF/iSdRCJUPTX62OD5z4n69X22n9JeV5XkfOif5fgl4w9nY4OQlKab\r\nMCQ2m/5PQBAXvQN053VpzyYX4WXVWibVFcrAErBx2rD4dTIyHHZbqIc8Ebxu\r\niAGEFPAOJSI7I+4xRa3akagd3pgHQzsbI23khGaxLsTSdFLlAGcFxgasCJmu\r\ntYrBPihOCeECMo7uqcEtOlSO+pR6XYPCg+ltjPPoydMe139X6C/hqjZMwLo0\r\nzS8dJBFNXRwLZqHfDfC2oYu+oRyufmExyiZS2l3Gaxa1cTT0IBirTYYF6f8i\r\nluMavBUJywfKPpOfOGpk6PA0Vy86RTo1LBFR5pvDfki5+2/zsKGs5tWW9qpn\r\nodEcjsolRTLL7IsPmupgraLx4d3HWsE+nXJ+Llryy8ikcu+e+PEdNzdBHvDh\r\n5huQyuapyiEHSnz9lbk7kGflvVS0Vb4pthc=\r\n=Cing\r\n-----END PGP SIGNATURE-----\r\n","size":1776,"noattachment":false,"key":"/@envelop/parser-cache/-/@envelop/parser-cache-5.0.5-alpha-20230211213705-37afd04b.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-20230211213705-37afd04b_1676151475192_0.8785051092511011"},"_hasShrinkwrap":false,"publish_time":1676151475384,"_cnpm_publish_time":1676151475384,"dist-tags":{"alpha":"11.0.2-alpha-20261126100851-58d9782f151a975e802f1a545a315263d8d886a7","latest":"11.0.1","rc":"11.0.2-rc-20261124205929-9595907fc2bef8a397343bd288fef4685ab9f508"}}