{"name":"@envelop/parser-cache","version":"5.0.5-alpha-20230212092623-49746af6","sideEffects":false,"peerDependencies":{"@envelop/core":"3.0.5-alpha-20230212092623-49746af6","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":"49746af6f4a9c956d92a1285b1c544e1619a7200","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-20230212092623-49746af6","_nodeVersion":"18.14.0","_npmVersion":"9.3.1","dist":{"integrity":"sha512-DPA86GD0461GJCRlOkXb6UjXwAVVtJZILmD51Bhm8DItyT1ZUZIlvr2Mwhd6WAOfSqhfN6RXmwjaxnTuPvoxKg==","shasum":"fa247d62116156f75d40347c369a5f42b8e8dc57","tarball":"http://registry-npm.ywwl.com/@envelop/parser-cache/download/@envelop/parser-cache-5.0.5-alpha-20230212092623-49746af6.tgz","fileCount":7,"unpackedSize":6301,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHchuuWNxUnVeLhJRLPJu05Pkoy9B1iYci8K+rWF52toAiEAkIpOiDP8yW/M7nSzrFWo54W/1M6+GiPQoKrOAVi9BH0="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj6LDuACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrQfg/9GdQmWs77/jpaKjuWTJTi0wA2Pn0vuQsEZQnl92HrsJfdJThA\r\nBO71pJdf/Hq/GG2S9Aqdo1xpx6r1aoJOFjUBaiMEsnLUZ/7ZEmhtLKe3s/oI\r\nNj4QQt6M6CGT2/v141eq+jCEGBLvKq5zwq7CTw8bBH1ppjE9fYV2zR1suZlo\r\neMU8waO8dFvh2Kt7p+Y472u2jqdkFn6Er4ASRDbXrt2tT4Vsl197Qm7LrNMg\r\nF4JvrN3XgEcRu9d5PX0wRHDu8su8vQeGAbqNT+e9NxbVuAqDe6Bh+8C4T9UW\r\nuiTTk/kOD+7TjSPmi5tQzUrLioiBWmR4ww6BGJVYp+R1pqg1j7L1h9kbb4X1\r\n2DCglxbY+JnWb3lRQ8Vh3v19B0em10M6dHusQxJU1Ymh29h0xpx0Lz9QVbfl\r\ncMLbBIbks7QA5s85cg46f73T3WnKezroPBtY0mhcEttZpBTk2lTg/58bzd5X\r\nGaVQ51Cx16Y9gjg1EwPDEyLLK5Nm0EQMa1R1UOPHj1efW4+H3Z0RT+rMfdEw\r\n0sIi5U5WTgAN+zVJbDBrXjtq6zkfRpXiLCqiRJ9V4xlrmjduk/hhYX0ltM+Y\r\nuJji3/xvHNJcqAvv/ItPmWt0qc5cdQLLwsaoTvTEgFtfWSiINF5Q+BMWLofr\r\nZy8DuXbXskV6oExcSSczrJn+g3YnTS1cb30=\r\n=ITq5\r\n-----END PGP SIGNATURE-----\r\n","size":1778,"noattachment":false,"key":"/@envelop/parser-cache/-/@envelop/parser-cache-5.0.5-alpha-20230212092623-49746af6.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-20230212092623-49746af6_1676194030641_0.7495990011336493"},"_hasShrinkwrap":false,"publish_time":1676194030792,"_cnpm_publish_time":1676194030792,"dist-tags":{"alpha":"11.0.2-alpha-20261126100851-58d9782f151a975e802f1a545a315263d8d886a7","latest":"11.0.1","rc":"11.0.2-rc-20261124205929-9595907fc2bef8a397343bd288fef4685ab9f508"}}