{"name":"@envelop/parser-cache","version":"5.0.6-alpha-20230217152026-4108f620","sideEffects":false,"peerDependencies":{"@envelop/core":"3.0.6-alpha-20230217152026-4108f620","graphql":"^14.0.0 || ^15.0.0 || ^16.0.0"},"dependencies":{"lru-cache":"^6.0.0","tslib":"^2.5.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":"4108f62009c0496a9436f744f8a6a736a301de05","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.6-alpha-20230217152026-4108f620","_nodeVersion":"18.14.0","_npmVersion":"9.3.1","dist":{"integrity":"sha512-x+LtdkYmj5uWcSqLWxf98pZAwk4CilTM9goO4QvGPOpebduxedBSBjBJUmgQM64yiMEhlfBbBCoVN2abQ4l+Dg==","shasum":"0b9139dd02e8023da9979578aeaaeb5a5ed4b1de","tarball":"http://registry-npm.ywwl.com/@envelop/parser-cache/download/@envelop/parser-cache-5.0.6-alpha-20230217152026-4108f620.tgz","fileCount":7,"unpackedSize":6301,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDKfKPgTqr9rbZQWMtZD74Vf9aOINvxWBFIVUu4ItylGwIgNfQ0ryFmNqwFJhMGXlz8WraXT7i59NFDZVQ+9a5KiPU="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj75ttACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpdfA/9G4gBR8/bQtDTV0scPMZu5BX58lqfCP2bzWsvAd+EQUNLExFC\r\nSyZ0QlO9V9tuiAyIxC+5fi39nLH/Ws3jqsPBTHTMwi15hyqcgSQu59YPQ62G\r\nN2U0eM5Vy1lB6HUiqx/cXfcg+E1lgywjG7fUcuchR5/z4sDxd1NrWuEksl+l\r\nO5A40h6W6LhLg9HlkEbyzd7GHUQJI1EcQTkM2LNS9AxnudwMbKzZA5qTb0fu\r\ndbIGMNLSoofZ3QaUZLDckjbB4vSWRq8tGPQLfWYkgDetffStkV0lzpZt2Ez6\r\n912g0byva+3uQ5X+oY1f6749+UfAixV2Rh1Yw3TIReDqAJCGuiDXP8eUDJyT\r\nUdbahlG+woJ/hwAwbOWEY4tk+nTDtnwxezNamAiMxYqqOJGn+ogCNofC9V09\r\nWE86GbfMxjvEakXMk0e/ccSkAGWp3DSnHUqJubr6ZnvJ2jTgU6zO/TJkEIx7\r\nSEcWPNYaKV/lQUyc5i9t9VddlRQoupXsm5/wP8afia5PYpCaZii56D/2Uuck\r\nFafExUBT1ngwsluJGwapel8M+LouOapL0Owonxk43qWz+ARj3+NMpxRO9bIQ\r\n1/sraU21O9hagz70Dtg2EqMEwxt40Kdd+I8HpCxCKWLFFZHyDqrSFThF0OAV\r\nJNP3a3cKdnILeCi4zVP+0BW4EkC2nDn44LA=\r\n=uPqI\r\n-----END PGP SIGNATURE-----\r\n","size":1777,"noattachment":false,"key":"/@envelop/parser-cache/-/@envelop/parser-cache-5.0.6-alpha-20230217152026-4108f620.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.6-alpha-20230217152026-4108f620_1676647277367_0.05615551517513717"},"_hasShrinkwrap":false,"publish_time":1676647277536,"_cnpm_publish_time":1676647277536,"dist-tags":{"alpha":"11.0.2-alpha-20261126100851-58d9782f151a975e802f1a545a315263d8d886a7","latest":"11.0.1","rc":"11.0.2-rc-20261124205929-9595907fc2bef8a397343bd288fef4685ab9f508"}}