{"name":"@envelop/parser-cache","version":"4.4.0","sideEffects":false,"peerDependencies":{"@envelop/core":"^2.4.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/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.ts","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.ts","default":"./cjs/*.js"},"import":{"types":"./typings/*.d.ts","default":"./esm/*.js"},"default":{"types":"./typings/*.d.ts","default":"./esm/*.js"}},"./package.json":"./package.json"},"gitHead":"7a089f68a25eefe32c1734ff7cbab3888b5f6764","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@4.4.0","_nodeVersion":"17.9.1","_npmVersion":"8.11.0","dist":{"integrity":"sha512-m/RhbWlkKmRftqytWfBGLJCtiUqSOb3gxXsk4/TOlABZZ8KPeI4Yiq5SwZh6UrFOaup00QZK+fWmfjdniLi/sA==","shasum":"be4685b8fbed46a54ba740ae8e264a35328637ac","tarball":"http://registry-npm.ywwl.com/@envelop/parser-cache/download/@envelop/parser-cache-4.4.0.tgz","fileCount":6,"unpackedSize":5460,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBoZaWr7iQx3zQMvMq/0eVFrs3/rO4i1q0p59C8AQ79ZAiAc/+iniRl1DxYnfjJhW0cl5bH1S3HViv0m/UN4AfPI+w=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiuYpgACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqECg/9Ei+aoxsU/6di6XJJm6Oy6+t6Xst/1+bvcewn5INeazwWg/A4\r\n1VgMLumnRInnXJ66G0SXZB3NBWYUGU2t/jR/bHNtSaUnKSkQqbeWR7EstRmy\r\nXE/H5H/X1S8vxU14/bp7lXRdjrKTmsWKf+dlOfkyRjPXtxogyNrDhvF8CiFf\r\nSIao5YyxZy1cqFv4DoObMBDq83SGgdcVW6jbKWYcKmW9pqASbHebA3c1r8Zg\r\n4vRxMjW/R9ASkxvkmFxWF/9FI/5bVmlCm6AZgt7CqpTaQzS+ka3eH+QVX1/c\r\nIN3D2XuZjJC9NO+OOyod1cPOmcqC+/9JMQFFQU3Gyo74fvwFOj6VG2uIaH0i\r\nQmh57lz5XbSeokOt7IqmdVj7OhSdv+7R4+j7iVaFDFFxvlc92ObD96MHe03V\r\n0eTO1/5P2agyHvyYMaA+9xpI1nv66Jgz8/qATiocPOTGJ2lpHTrpGoTEj6I0\r\nhkWMk8FZDIeam03T+W0eOlFiVzORP6uEBO9U6tgckKMw9jzjINo01S3/X+c6\r\nlKZLaDfR+tl+8nPt21R1qckWhT3rcUj6rVYykQq1Z3lXZ9xmyu7W3KDkxmF7\r\ngaO8jnLkBTDG+OvFbfNjiLqDshbom+p/oqGYTYz98J/BmrjmfcvH3Xwl3Q7m\r\nGRROrSAeo/7Nhop0OHQDMoRSsNX/z2kFQZA=\r\n=Mk1u\r\n-----END PGP SIGNATURE-----\r\n","size":1645,"noattachment":false,"key":"/@envelop/parser-cache/-/@envelop/parser-cache-4.4.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.4.0_1656326751932_0.5345114548929355"},"_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":1656326752052,"_cnpm_publish_time":1656326752052,"dist-tags":{"alpha":"11.0.0-alpha-20261019231601-b21e6cedc1a444383d9ce69fe6180f5b4ff67120","latest":"11.0.0","rc":"11.0.0-rc-20261022165416-7c29decb398764e6ac3915e1c539c478cbf19237"}}