{"name":"@envelop/parser-cache","version":"5.0.5-alpha-20230214092048-d15efb1d","sideEffects":false,"peerDependencies":{"@envelop/core":"3.0.5-alpha-20230214092048-d15efb1d","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":"d15efb1dc2f13780de286c44322320d6bdc2da1a","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-20230214092048-d15efb1d","_nodeVersion":"18.14.0","_npmVersion":"9.3.1","dist":{"integrity":"sha512-4wG8rnisZ65r7hGSDEX2LfXvV4Xhfk5R7lokZ51d9JIAyu8HuQfkJO+PJJhksj7etR4b68tJ1F/oXerpYYH62Q==","shasum":"d134ddf33c7f60b9dff2186dc9dd1d73c4ba6399","tarball":"http://registry-npm.ywwl.com/@envelop/parser-cache/download/@envelop/parser-cache-5.0.5-alpha-20230214092048-d15efb1d.tgz","fileCount":7,"unpackedSize":6301,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFK6y32ULMqL++ori+yh+epJQHaCXwP8OssFXtYR7W6GAiEAhJt21IDwE4ge2qMXPZlxj855v690kTSVLkO/hMIi7YY="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj61KgACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpRIw//Xy9OaWRjv9Al6pRYVZk7lfFgcH/Vzdp+IGOtnygbSVjFeFw5\r\n1ffj8lVt+f6+k/P+HTJRNKMHz6yIKatjbfMkIgpk9+fZI0LtWdfI+uyAeML8\r\nwFyq0aR5NhYd6/K5UeOjHkIHDeX/AXd7P7p1W/XHrg8+CJ2vNC3Ww54yYhN4\r\n5GkKiGfdb994yLroSv7I7p8RFcBXvNwfGS9NVYkV/zrr/7FxQDKW9KSlo8+E\r\ndJQY14g6aXIXVBuExfDBkvfgnjdROPXgLVfdpnr5U4pfaKmSxt92n4kVZ4Se\r\nUlAxz+l/+Hu8sla8lyf6Dhx38DAMzZNePDNFGEusk8dyH4dUOe8oNQIy/2In\r\nuc1N04P/ULCucRnoN1GbYCPiI7o8MJdDtin+XHAgWka0ILV0AGITmCWXJZq2\r\n9CW2z1m203iFDor2MiI/h+jllrmIJ0SxR5hxP9ZoO8N2tZi8x9B98m2EnqqG\r\n7YNAZlTDYvUV3RW6TqK4sXLqnVeGhxO6lHZff5PtNAzEYhbruMZCHeU2f+sB\r\n/rVDVTTCR1nNBb/CWLUOFHJ0gA7dbZC8cndRGTgx1+Wisi/LdWPQPQTnXtn9\r\nfwcrzDE1/5dEbOt5sXHqLgE5ABn8WN4t0jtMo4BmH9K4eAv2osTG1gZ7tc7g\r\nLDvmKRwKalmPKcdMjGpB/lG57nHgX2wORUs=\r\n=nmkn\r\n-----END PGP SIGNATURE-----\r\n","size":1778,"noattachment":false,"key":"/@envelop/parser-cache/-/@envelop/parser-cache-5.0.5-alpha-20230214092048-d15efb1d.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-20230214092048-d15efb1d_1676366496011_0.7877125180179454"},"_hasShrinkwrap":false,"publish_time":1676366496248,"_cnpm_publish_time":1676366496248,"dist-tags":{"alpha":"11.0.2-alpha-20261126100851-58d9782f151a975e802f1a545a315263d8d886a7","latest":"11.0.1","rc":"11.0.2-rc-20261124205929-9595907fc2bef8a397343bd288fef4685ab9f508"}}