{"name":"@envelop/parser-cache","version":"5.0.5-alpha-20230212122424-d7ad72cb","sideEffects":false,"peerDependencies":{"@envelop/core":"3.0.5-alpha-20230212122424-d7ad72cb","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":"d7ad72cb5d16f878ba49ecc2eec36c124e72ce87","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-20230212122424-d7ad72cb","_nodeVersion":"18.14.0","_npmVersion":"9.3.1","dist":{"integrity":"sha512-8L6o3qvFFDFj4di1ePjBrzy59KnzaZh4kljDfPfc7DHF5GCjSX6G1ZqeOO8lH4ZbQ28owrC2m0xNbpxMK32cDw==","shasum":"a1bc76e4090c3d5a7b9aeda6728a757a791934d5","tarball":"http://registry-npm.ywwl.com/@envelop/parser-cache/download/@envelop/parser-cache-5.0.5-alpha-20230212122424-d7ad72cb.tgz","fileCount":7,"unpackedSize":6301,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICtbKfkGAGpXe2QhDJGJ87x4neK3AwywDGKJhUHyfCLMAiEA8pJeZ0LFd2GHEtikmzFqJvu9Oh1myQI+SWtvbVa8XGk="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj6NqnACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpRbw//ecEt8QJnEggnfZSzatY2+23Eqa0JscZQnCnn5/i/7e5OWT7W\r\ncfQNu2Ge9xs8+UsreA1nbe22ZDCw7sSeSChj92sZ/WsXpb5ufM021Q8jV2K+\r\nL/bgId9clH8+ngSWJpXDiO2sGdfetLRI5indKrWivg3g949NEHawzrs6G1H5\r\nMEeJi6dQaGMq/eb2Wx1nwATcreW7sot6Bx3wp3HnGKfFCNtVYowFxOQKkCOc\r\nzoQ9zpICfuH01k/IeqcQLsyhJx8DNf5q+Sq0laOfIVem9WF4iBRLQJ0foE/9\r\nVQJ/ADuIvB0A+mfgcGNFjZfBM/5HinmW2dFBzN8sR9OuzoQxuqhvoc9wI8jo\r\nI17ZFgOJ9yUAj+xjxvGz26yWxdDSDClNqv6ecrjNGf64vqjZ44n1xhPaxrk/\r\nw7ojODloNQmTl4COJmhLkUEe49aSAdIxaqOz05faB//Wv2/pSvq0RpXV/h3F\r\niOdjeeWjlhyHs6T7mZqFHWhS1HoBXS6KWOrY1EIcVi4emhisVJoEzg2srBgD\r\nEfNJQqabJew1q33qnAKkFTGC/sb0zMMRL0mIoXK6S9GhtrtMkHpMdr3bFSUW\r\niEEfqKGu25kUg7C8XWGdOyXSNYFwiN91HQz6wc2DiRuJh8mlncXMvJBrHPLF\r\nPHiqa8cXBogLK2sKgbThT2BNXoY3dqMpuFE=\r\n=IsrO\r\n-----END PGP SIGNATURE-----\r\n","size":1777,"noattachment":false,"key":"/@envelop/parser-cache/-/@envelop/parser-cache-5.0.5-alpha-20230212122424-d7ad72cb.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-20230212122424-d7ad72cb_1676204711704_0.9354549990960344"},"_hasShrinkwrap":false,"publish_time":1676204711902,"_cnpm_publish_time":1676204711902,"dist-tags":{"alpha":"11.0.2-alpha-20261126100851-58d9782f151a975e802f1a545a315263d8d886a7","latest":"11.0.1","rc":"11.0.2-rc-20261124205929-9595907fc2bef8a397343bd288fef4685ab9f508"}}