{"name":"@envelop/parser-cache","version":"4.3.2","sideEffects":false,"peerDependencies":{"@envelop/core":"^2.3.2","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":"9449ef36f61d4d9561f88a87204b3a16f3c6f98e","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.3.2","_nodeVersion":"17.9.0","_npmVersion":"8.5.5","dist":{"integrity":"sha512-gdi814GdJ8PazYBGtWcpKdqtbBbxhbdXBKhSpTjt1kNmgzBsKV1VV2J674/9UqwFjhpuk2POXouIwF0t3z6mXg==","shasum":"d4e7a6b5ef17fb91ade57ee7848c76c889503ed6","tarball":"http://registry-npm.ywwl.com/@envelop/parser-cache/download/@envelop/parser-cache-4.3.2.tgz","fileCount":5,"unpackedSize":4931,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCyJS8yVnSj6tuxq2OTYxu0kngTCY6G/lWTNnG162WpzwIhAM978tOiw9fjAzMaZrKc/I7jG26R1wRU29w2VoYARKoR"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJie7sFACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmojJQ/8DEqJ+MCg3MmzK8EG/jnm6mvXuIGI/0WFAvwsvMxZagf2WmM7\r\nVlbOIdYgY480+ocZ+PZNGV/wQhvUfFyzncM4NqTP7j+Id8V/I74n0ijn1ndl\r\nwEqgBWQSPmqY9fFOPmSRnqrZ4iyied6zY948fIMZhBOQ23EyHHt1ImSLo39J\r\nWVxrR0Eefy3EGmyOpLQGeakDuSgpKUaWMR6tsGku5+NIlLcSnFfPpKXJ7QZZ\r\nWzcZPEeTIFlNUNUurapg1doz8zrwwLVOFSlEYsdA6t3hLz9txiL1eW4RYSQZ\r\nXRmCgr0kfnkLTy5353PBPd2TVCn1IeHVwceKbMIBfBi+TPYP3YPi8gGn6WVn\r\n2nRxyL5bdZMJBRHVr+EZZ0WoV1B1pYvVLCB30sFtPwYzUwno/vwzzr5ow1hs\r\niqfKAlQKK5llA3N8WdtJEJO2rhLWpqq693+/VQYTgChuWW8F1jBAxX9DX4AV\r\n7khiGBrpiZcFOsiTQddj/w0dAXwk7qyf68i89a/RtEuChhy8zLUZAARgcVMy\r\nO2kPb8nlkUoT0e3onqJ2AS093iSgytIgMXOT6F3vUtteuXFhzqRVTYBsW0Ye\r\nPVjhy8hst88GZxpCUj6GBoPGrhfXhse6THs8F0bgf8FKTrV6zx5t+m3cjNO0\r\nsmVh9LxRO4PBkJUF+kyPQMcG+76p3cX1AuM=\r\n=9NnD\r\n-----END PGP SIGNATURE-----\r\n","size":1570,"noattachment":false,"key":"/@envelop/parser-cache/-/@envelop/parser-cache-4.3.2.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.3.2_1652275973184_0.21498499695843587"},"_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":1652275973352,"_cnpm_publish_time":1652275973352,"dist-tags":{"alpha":"11.0.0-alpha-20261019231601-b21e6cedc1a444383d9ce69fe6180f5b4ff67120","latest":"11.0.0","rc":"11.0.0-rc-20261022165416-7c29decb398764e6ac3915e1c539c478cbf19237"}}