{"name":"@envelop/parser-cache","version":"4.1.0","sideEffects":false,"peerDependencies":{"@envelop/core":"^2.1.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":"b959ab79e9f5962f47bc31a03ec5e7bb3f9a6d97","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.1.0","_nodeVersion":"17.6.0","_npmVersion":"8.5.1","dist":{"integrity":"sha512-uJFXJeqj6jeIqAI/E5vyYZyTmFbGqOft5bGC3rbAr0MwTkUqoE8J21Hh+950/eKAOzXjLshzxSdTMTYyrn0Kxg==","shasum":"f330869c96744094611a02bf019a60d60e63255d","tarball":"http://registry-npm.ywwl.com/@envelop/parser-cache/download/@envelop/parser-cache-4.1.0.tgz","fileCount":5,"unpackedSize":4931,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiIPM0ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp5iBAAmzEDzD6GlpHevsuVPhOORaAplTRTUjOV6AgNauQitYpl9Y9I\r\nqIe67s10+vN64trWg3dPgLsCuY4ez5F/Dnes4kluzag7YEtkSiSL1KtLbIjO\r\nMVoJ/bzyrfomCaZ+nFv/KVlyc1q3ceH+20XE1KI1Go/gJYoHdh3XkEyiQGIP\r\nL5388Jtc+pih/tBsX5VczGksVRVLm/r1FLggvHGFROq0ofXYFuIkPNNPkMbX\r\nG4+0j+R0/6RPEn8MBdAqtcPf0aVkn78BA8ymU1hOPNbtO83edLWshE3yBho9\r\nf3gJvIWA/eZq0Mc0vRJ3CBbxbT5lZTG3t/sxWq0kDXZqphIy9dHfTD+6cVj8\r\nFo6PuKsUnrxUXJ1dWX6yqkyACjVwqaIqHV06bdEWfbh8ZjyRr8M4YIhUChpU\r\nrbOqIlc1JMkpIlgKPFcAy5uiu7LfrFA3+SGJ7mHK9/Yev9/mAtuLnoNBiIPq\r\n+BXv4W9zk5JHwS2TSdMgYINV19gDftdCxjwzTXdLFq76CtjwUWmY9IzFtTrP\r\nxnWgc6svygS8uFRO9hM+/F1rteY41WWzJRPBwd5SKbUstljBJB+VeCprZplo\r\nKJ2E3441incmb7BJdJUa/6kerv9VxHaptsxHkkpViQ3MV0AqXFWJFolUWiGt\r\nG09Unnhvv0RX+r7plrPyeVnYZMMUxuVVWGY=\r\n=eY4Z\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGfqogIUpHbjwhj0mqVmyux6ZefB+lGguXNH0cpctzuGAiAmmTOjYJqIBLW0SFeWr0L/BzEFTzr9KkyDcxpRgIDhDA=="}],"size":1570,"noattachment":false,"key":"/@envelop/parser-cache/-/@envelop/parser-cache-4.1.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.1.0_1646326580080_0.07963945719576393"},"_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":1646326580187,"_cnpm_publish_time":1646326580187,"dist-tags":{"alpha":"11.0.0-alpha-20261019231601-b21e6cedc1a444383d9ce69fe6180f5b4ff67120","latest":"11.0.0","rc":"11.0.0-rc-20261022165416-7c29decb398764e6ac3915e1c539c478cbf19237"}}