{"name":"@envelop/parser-cache","version":"5.0.6-alpha-20230217210809-e3909a01","sideEffects":false,"peerDependencies":{"@envelop/core":"3.0.6-alpha-20230217210809-e3909a01","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":"e3909a01cd4783a06cc73eba9e606dd7299b869c","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-20230217210809-e3909a01","_nodeVersion":"18.14.0","_npmVersion":"9.3.1","dist":{"integrity":"sha512-FEOGyMri1fS+fIoiegY51fQUmJxOHchTsDrbjs6KmObm1OUsAFXhAtQJtPwKW1FH1j4nUyoXr0tEU65LF1i0+g==","shasum":"cc8822644bfa1796c90808ca029195f2edf7996b","tarball":"http://registry-npm.ywwl.com/@envelop/parser-cache/download/@envelop/parser-cache-5.0.6-alpha-20230217210809-e3909a01.tgz","fileCount":7,"unpackedSize":6301,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCRr0zBCNxF8XfzwYt/0BMmYSIYx+VUNxj+k9tm8I/asgIgeLhedSzfoi2igvmh0rNZ7gP6qKQWqLDh+MPsCutChpQ="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj7+z0ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoRRQ//Qcn5X8VF/k7jycvY2kma8AHbzwRoN8wWcdYvwjJP0QAgjW/i\r\nWHLep8RgEdOtRdTJaJKY6hXUnGE6Qj2wR/EyIusPIgLo9jSpBhpBvVgHiY6S\r\nzyHEEdaH9OwflZSoHsze63Uiw4NAB+C6H1/g2xY1hOXzzLSNmQH4J34daTOC\r\nAIXNqkB2UsrnbhOHDjDYGLrnA2cn31y0/UU3nyup2oFoSXil9KAQOVDk9IvI\r\nXITjtML6StBlZ/I7XayLtFX38CHv+9yn31K1qL6sYKzBVgeqn2kTKyC+FsUi\r\n9OMyI9R7M1kiZuWcc1O4kayJGroF/INQiGLhenzHkeEpG6h4woyIKGOg66Nt\r\n9wpaKohkErn4elxCbi4q3mJ84pni2peV59xwhTzro1W60fPPtk/ihmVN1heL\r\noDNLtdrzfOT2ruEFz5Gaw/odvBEFfTsCVM3HSxywe+0NmFxbpn9a7xqdFxIV\r\njBMyAENCelFQ2YpgDd9HZhWoQD5v+O7Bo/GV5anWweyyo92WF9+Ih0JClXB+\r\nZ5VCSREhgtRkbZTgSGcYTZnMskErSrBGdV4X0ZUXLNALg5mY7acUl4U0uNdU\r\nO+XnOHvYlQCgHcGUW81WFG8EUGcM7m1TF6JIw3UR5Ej2eljXAwThv4OmmBnE\r\n0oOnsgTRyRqKk+lnC8hRoW2sZ4j67c5TiE4=\r\n=ttfN\r\n-----END PGP SIGNATURE-----\r\n","size":1778,"noattachment":false,"key":"/@envelop/parser-cache/-/@envelop/parser-cache-5.0.6-alpha-20230217210809-e3909a01.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-20230217210809-e3909a01_1676668147909_0.1682351088363112"},"_hasShrinkwrap":false,"publish_time":1676668148104,"_cnpm_publish_time":1676668148104,"dist-tags":{"alpha":"11.0.0-alpha-20261019231601-b21e6cedc1a444383d9ce69fe6180f5b4ff67120","latest":"11.0.0","rc":"11.0.0-rc-20261022165416-7c29decb398764e6ac3915e1c539c478cbf19237"}}