{"name":"@envelop/parser-cache","version":"4.0.0","sideEffects":false,"peerDependencies":{"@envelop/core":"^2.0.0","graphql":"^14.0.0 || ^15.0.0 || ^16.0.0"},"dependencies":{"tiny-lru":"7.0.6"},"repository":{"type":"git","url":"git+https://github.com/dotansimha/envelop.git","directory":"packages/plugins/parser-cache"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.js","module":"index.mjs","typings":"index.d.ts","typescript":{"definition":"index.d.ts"},"exports":{".":{"require":"./index.js","import":"./index.mjs"},"./*":{"require":"./*.js","import":"./*.mjs"},"./package.json":"./package.json"},"gitHead":"d3d46fcaa0d5ad70e288f0cf1ce7d8d4338a95a0","description":"This plugins adds simple LRU caching to your `parse`, to improve performance by caching the parsed result.","bugs":{"url":"https://github.com/dotansimha/envelop/issues"},"homepage":"https://github.com/dotansimha/envelop#readme","_id":"@envelop/parser-cache@4.0.0","_nodeVersion":"17.4.0","_npmVersion":"8.3.1","dist":{"integrity":"sha512-gwa+ZsOEOfdToKWZyzqfFJorn6zdCLw88nEppl4yX5TI+9MvCLwnKegfPt/4CiBZCGIXXsvbPouYw46nkj4Cmw==","shasum":"a70877fba1a0477c62d39eed5ce3a9057d3847db","tarball":"http://registry-npm.ywwl.com/@envelop/parser-cache/download/@envelop/parser-cache-4.0.0.tgz","fileCount":5,"unpackedSize":4931,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh+knmCRA9TVsSAnZWagAAjg4QAJH2u0/eG/mZyZ0bPZSU\nzQ/TQSjL7LmYZJTcB4mTp4JHvTutAgDQvW6K1VX+rpfjeMYMNCZ5cW7W2BBL\nocmcbgyxqU3eoHgxMVbaFnv6XBYGp+P9MPI2+gnpLHLmoFNu8DrwWkZAiWJj\ncSUr32B9KGj4GPBOI9fOBAF6rUHjsCHa/UTpB77iYd86bf5j2hCymnPkrfU2\nDQMHImNpUILf+PlNsk95rZWczPwYWX1s3pCsX8LN4IGQYFkk4LIP2y9z25J1\nALUYjScDMMMp6Yvds01cVJjFWdlCLDuGeL4WfhJU3caKzHAIH+U+ouTjqx8Z\nMe/MAVwZIpg5xExnOjlNVjFxyrr0hu3Lo14vSBPPZxLxrz8i6HTVdp8PQmVK\nZACEoLGZiNmOBBkd3T46bTNAX2iLaX/ojy3RJexpmsiR1EHO8RLSL/eJXw1V\n6/z1JjlbuC88UUWoaxDBB/ePSbwSPRbx4/ON9CnI31nUMpkbWpgnDkb2NMOl\n8ufozWiMKdguvEaXkvGKgapt/lWyb1SYSVdbhiTFfRGyB+S9RTtlW1MJ3y2M\nIRkxZgfCf5d6EMhiwe0q+QGiILY4jxxyUqg/NN/MKDojttpf9LrsF9i+g0RR\nKLAeZmILRljvUBbjCopAKwVHCa7UCOWc6d3BFpLzIt+QLxoIq9Q0JgpPMPOl\nqZ7A\r\n=CO7B\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDVspLukOfIPnJDn/yCr2t8mhtyA1a7d3gzywwAxDA+6wIhAJZA5NcYceLyuhXmvYUs8uPpGfeISFYBsdrhWR3ximGf"}],"size":1565,"noattachment":false,"key":"/@envelop/parser-cache/-/@envelop/parser-cache-4.0.0.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_4.0.0_1643792870477_0.9043650457966921"},"_hasShrinkwrap":false,"readme":"## `@envelop/parser-cache`\n\nThis plugins adds simple LRU caching to your `parse`, to improve performance by caching the parsed\nresult.\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 { execute, parse, specifiedRules, subscribe, validate } 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\nusing 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\ndefault `max` and `ttl`.\n","publish_time":1643792870613,"_cnpm_publish_time":1643792870613,"dist-tags":{"alpha":"11.0.0-alpha-20261019231601-b21e6cedc1a444383d9ce69fe6180f5b4ff67120","latest":"11.0.0","rc":"11.0.0-rc-20261022165416-7c29decb398764e6ac3915e1c539c478cbf19237"}}