{"name":"@envelop/parser-cache","version":"5.0.5-alpha-20230212032836-232757c2","sideEffects":false,"peerDependencies":{"@envelop/core":"3.0.5-alpha-20230212032836-232757c2","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":"232757c26471a03b9a315fc72df55b4a0f6e117e","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-20230212032836-232757c2","_nodeVersion":"18.14.0","_npmVersion":"9.3.1","dist":{"integrity":"sha512-7fJFmMXXkf35G166EavUluaZfnUboyyFWsSL0FLtM4Bfrj15GeZjLtu1Fn6N82snOGz7wO8YjlSyiK00TFOQTg==","shasum":"aaf022c4d50ca80fe84c9a3b0d09d42f37082888","tarball":"http://registry-npm.ywwl.com/@envelop/parser-cache/download/@envelop/parser-cache-5.0.5-alpha-20230212032836-232757c2.tgz","fileCount":7,"unpackedSize":6301,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE0E8gqRuwGegNDlp8AFpVdeMpWPqHJ2eLbCAcNPjqdwAiEA5aG8JiDmqFKuNxxE8MO1+2JMhEreWvyL2SwmL9NAmFg="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj6F0SACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrmPw/9GbKlOgye5G7ktZCXPZ3NrmOVYngdc6M2kOxqeRaY4nqdXuiA\r\n9PaGq2jfGAR6/LcLOldr/I7I1QEPoUvUkxt4NwfPifgF8CaJtH9nj9TweVYy\r\n1/BUZXAlZjt+Hp25vLPN02m4P/Ss8c6piCCoh9Hw6OypGgXmixOlHuWsQ0nn\r\nOa2xxKblG5ikndN5068WRQM4b410ywFecScFWoCNPl7Ep80Pucn7UQCQf7nG\r\ndRFdwM1XPGEjeBkUiz9DSSxV9qbueJevthjRl2M94OSv3ihTQPnNZi2IHvcm\r\nlzIvxV3BwN8LE2aNIXdumGhj5ZYdVBzLprd37tBrda9MhxJ9eZBq3UxLT+UZ\r\nkWd7QSark9SrYaQqYwM4N42NeFO22/kYm+J+XRsZ4Wf3/HRDBkSZxyi7BJjd\r\n2w/+zUImpNVsU+s9fCqAQwJfkurf3UpJC12PPdvuyezk7kdk9hHMQBiAjbxF\r\ny/ZxCk6EHm+zEVl3Cfa01JtHYvW9G2ZjN0w8xhDXg+o1H73C/h+IYOKZ559C\r\npjWWbWpVJqRQe/LsvnkBUUiTGt6x6wRTnHaNkMMApj6Vf85940+HSy9pTqQE\r\n2kGWetOdVpMW35Ns9rqNZJ9KBGsiXr9XeBlEObhucSCFxC/8t6C0pgXwn9if\r\nlqbM/ehUYrcVqkU6WjiO0LUdghpICQnE60Q=\r\n=SeS+\r\n-----END PGP SIGNATURE-----\r\n","size":1777,"noattachment":false,"key":"/@envelop/parser-cache/-/@envelop/parser-cache-5.0.5-alpha-20230212032836-232757c2.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-20230212032836-232757c2_1676172562228_0.8701729366985089"},"_hasShrinkwrap":false,"publish_time":1676172562396,"_cnpm_publish_time":1676172562396,"dist-tags":{"alpha":"11.0.2-alpha-20261126100851-58d9782f151a975e802f1a545a315263d8d886a7","latest":"11.0.1","rc":"11.0.2-rc-20261124205929-9595907fc2bef8a397343bd288fef4685ab9f508"}}