{"name":"@envelop/parser-cache","version":"5.0.5-alpha-20230212064016-5807729f","sideEffects":false,"peerDependencies":{"@envelop/core":"3.0.5-alpha-20230212064016-5807729f","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":"5807729f8f177c69aa10dac836a58890592fdd2f","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-20230212064016-5807729f","_nodeVersion":"18.14.0","_npmVersion":"9.3.1","dist":{"integrity":"sha512-RtkW9UcrzeDArOq/ZZtsDOFqihAxakJ/2D9Vaz2DgTr2IdiIQHMN3cm2O1yRYk1J03PUHyFEowcxRYsPWjZFmg==","shasum":"e4967de3eb7ad801ff6e6f8deb39051f48c0179c","tarball":"http://registry-npm.ywwl.com/@envelop/parser-cache/download/@envelop/parser-cache-5.0.5-alpha-20230212064016-5807729f.tgz","fileCount":7,"unpackedSize":6301,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDC1aqfhfSJKphtdLiglOd1TTpglzyEUq1dSBdt65Xp5AIgN4saG8GM5CDMDAVFglBMLmXThXqFpGOUxNedC7HEkw0="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj6In6ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr6TBAAlca9Pw1XC0UPBCnQ49JYdPs7e7tVsVSp+j/L77oo2vr6YBhZ\r\n0jSADhCNSJx9mssRo/nELh8w7hOrAezSZczMnsreQnmhg267SL4hxB+FhPdc\r\nyvfkoeRCZ7tLAwOefSPM9yMtcCpahItvv1Gdn3MyG2mn3W8LgTgsIwX1FKnm\r\nSTrgySnFfTjHLT9BkoQ8QZGATd3YjcYfUl03b16TvYqynFv7QEqBgvNiyu11\r\nWzidmBZ6/t+8o+o+JtSLAGnmq1aq4ZKHfwyAZC0W+p25Q5EWZLnPhPKGyfym\r\nfyO2Hh7ga0EjNZU/9NLrewfj4rXDw774QxavX1m+vxjOjRDXNMiKt/h2Rykr\r\n6nC8ourZDAR5RYqaosq/NrgSkWNmJZAxAdnaalsJPWbqpmrfxdebuaUzcKw3\r\nRrLCckzVMAwlDOHhp5Z+Xv42MUbJNnN1d8BomzAECqhbqxYfQJmVfBS1ZuAg\r\nL6GUqgzOy0S9FOg0DNCwixTzcdqg2J/f2GMndhchw4WLz1q7hye9en+vut6B\r\n8W3FjD1AdvFkk/JQU6DtqlQ3cURijjDzskgYpU4XuMtUALCkV6HZZperth6c\r\nYawpm7cu2alJ4Xazj3yi7igRqnwKNNFclEOPWBHz/Tx+6hsoKUQjrr8XPO9b\r\n1KLHuS2tMinUF0Bcqxldj2SjmbaaWvKHZWg=\r\n=4q3Y\r\n-----END PGP SIGNATURE-----\r\n","size":1778,"noattachment":false,"key":"/@envelop/parser-cache/-/@envelop/parser-cache-5.0.5-alpha-20230212064016-5807729f.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-20230212064016-5807729f_1676184058774_0.1373232109684659"},"_hasShrinkwrap":false,"publish_time":1676184058948,"_cnpm_publish_time":1676184058948,"dist-tags":{"alpha":"11.0.2-alpha-20261126100851-58d9782f151a975e802f1a545a315263d8d886a7","latest":"11.0.1","rc":"11.0.2-rc-20261124205929-9595907fc2bef8a397343bd288fef4685ab9f508"}}