{"name":"@envelop/parser-cache","version":"5.0.6-alpha-20230217200238-39637e41","sideEffects":false,"peerDependencies":{"@envelop/core":"3.0.6-alpha-20230217200238-39637e41","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":"39637e4118043369e095d45de2d75ac6c52e7e8f","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-20230217200238-39637e41","_nodeVersion":"18.14.0","_npmVersion":"9.3.1","dist":{"integrity":"sha512-kd16wrjQvbCW5AoqvR1qzfbAtMza8GEcPIflQKLeZnaRBfaGWODNiqzwsfR2rVgcDPqmM7bNrgs7QK/GSLGtFA==","shasum":"0e8b911e4233bec3a5fb260a00d1fc852f9de644","tarball":"http://registry-npm.ywwl.com/@envelop/parser-cache/download/@envelop/parser-cache-5.0.6-alpha-20230217200238-39637e41.tgz","fileCount":7,"unpackedSize":6301,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF6MzLlrzYkTyfy1MRuryg4zIQojc+I/UWslHsyw6kkqAiEA4z1XAf6ZXKY7umMWRLHWdp3GeBbFWw8u29bIQhHVnZA="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj792UACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo/0g/+J1FzLRqFGi5JkYxE4XQfgJc5lWdWAbTXj0NnC78fALR51IjH\r\n4dvuQdr/cpbas2dIf/gyqxw2LhC9Nw8n0JdP7q/13vFu462rlcC1eD1alxXp\r\ngidjiCz3TaQ4l6BHyumf92ANa3ltU2G1Pd8ZNX2xkg9OsAdpkuGDMffoQcad\r\nyabtCDK6k1wX9EeJS95Fk+RxqGnqxoU7M7FDEw4eF1GkUb0YQnRzeTXQ42AA\r\nkOjN48e/zjKtOpFOdKCZRL8Tx1qgoE2Nw6LM6uS/SI1TR1m/2JODg3e3dhip\r\nulPD0/x8u01dxdh//nSdKC6U/2XEaOttb6FsUV5yfMXwAz3We3Z4/QivJ9pa\r\nWJcAPuoZyEmQh8l9/3h+REvyD6b2llbD5I9P/tj57uReNbKmPLUQE435XUiP\r\nPGDgyPkVOtdn3vRsCIvdB6fLmq1ldoZ17YbVeeAD56wwatfGapxhvwGCyJxx\r\n7p2C1yHN4NfkcAduWfGq0w8WmXFDXkJhpPei9XrJ1D++lEGAgM9dX6LyR2Vk\r\n3OWX2+Ga3nxjghzdBKMCh226m+oJcbFAcIYmc4WU3PPp4cUVYHJO610Hl88v\r\n/apzziHpFMokQDnH2dJIV8XRuQSWf4cG+WXjjEYpm0qUtPxZSO0C9lH+9lYZ\r\nLlUUUSbELAVEOSlXBHJ8BEbhlCqK0ajd9hY=\r\n=NeCy\r\n-----END PGP SIGNATURE-----\r\n","size":1776,"noattachment":false,"key":"/@envelop/parser-cache/-/@envelop/parser-cache-5.0.6-alpha-20230217200238-39637e41.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-20230217200238-39637e41_1676664212074_0.6030266073312003"},"_hasShrinkwrap":false,"publish_time":1676664212267,"_cnpm_publish_time":1676664212267,"dist-tags":{"alpha":"11.0.2-alpha-20261126100851-58d9782f151a975e802f1a545a315263d8d886a7","latest":"11.0.1","rc":"11.0.2-rc-20261124205929-9595907fc2bef8a397343bd288fef4685ab9f508"}}