{"name":"@envelop/parser-cache","version":"5.0.0-alpha-20220921141314-ed5c9bd9","sideEffects":false,"peerDependencies":{"@envelop/core":"3.0.0-alpha-20220921141314-ed5c9bd9","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, execute, subscribe } from 'graphql'\nimport { envelop } from '@envelop/core'\nimport { useParserCache } from '@envelop/parser-cache'\n\nconst getEnveloped = envelop({\n  parse,\n  validate,\n  execute,\n  subscribe,\n  plugins: [\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":"ed5c9bd9f881eff03a59b95a2e088f57e0126887","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.0-alpha-20220921141314-ed5c9bd9","_nodeVersion":"18.9.0","_npmVersion":"8.19.1","dist":{"integrity":"sha512-ngPUU1sU1rG/fxz/c6vFq6kE8DemUJGsUgidYBUHGnpcfgjbgY3n24W0Hv4DSZzpO/1VaKUc1ouPGM7J7GZd0g==","shasum":"f419ba758ed86175e240faa3c2f52a76fc192e46","tarball":"http://registry-npm.ywwl.com/@envelop/parser-cache/download/@envelop/parser-cache-5.0.0-alpha-20220921141314-ed5c9bd9.tgz","fileCount":7,"unpackedSize":6247,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBsmKqOiUdl2AybYnichzfLa9GyOXhq/nGU4s8HF01qlAiEA3TzvQIzMQoW0mZu37H/MjqdXtawRWyRcIKZE/pSfJrk="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjKxwlACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoCzBAAlczm+qV8pP89XlSA7shfnkz6Etts1nb9CxfPQxVUAqX8Rl/H\r\nI4XbTYoraBnhuIGE288w6klr+ogXqBdJqm7N5pEV/1ZlEFdNgtoeLnIoC8FO\r\nXyYTsYOifblQ20MMJqSNlAZfu6RBX92JSbzyrMJxbtf9BkNvwAs1HGxvvI2y\r\nJ41JpVZopyCrx6n4uHKdxt3Gk6ILpmcRLnrvme/5P2klYOoT8cIHagKT83Im\r\nPXbZX4gq6c7pq3owMPLZ5GC38CFBSNVkCYA24zID+sQI6BP1mopSrIYeWDJH\r\nl61zt+E7f2gqbliFVzONg3JfRYgHFzU15k3NnXzJJMbk1NUz1Ocf92l3HtYM\r\ntup8iS2M6tSEAmfH21YojsV4K7VlKZbCXylKzNmYURAF2KNHTn9fKlEYzbVv\r\n43uObtNBHQXly7ebPv8ljM9U8rFCQC1yAo86zkOj1C2ir6MJfKjRDBeWCKiw\r\nNzheT/5aTaoqQwtG/X3KeHCXrGS3/Aypvthmbj3J6ZoPcw+4/V4uHdIq0CVg\r\nhiRduy9PFhfM/OEkyXbdj54j8A1o+yer/ESyEKbOPV/TSeHgQKB0LVSGIDhU\r\nVE/bsscVilqkDsQ0L5WmAcmsvsgFQL6ck3eqKBMQPNGKEVJt+LkrODySOY9Y\r\n7LOamkjurbv/cHJismQVfZu5C+RNcrt4EjE=\r\n=gtTx\r\n-----END PGP SIGNATURE-----\r\n","size":1765,"noattachment":false,"key":"/@envelop/parser-cache/-/@envelop/parser-cache-5.0.0-alpha-20220921141314-ed5c9bd9.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.0-alpha-20220921141314-ed5c9bd9_1663769637556_0.4880498174175967"},"_hasShrinkwrap":false,"publish_time":1663769637692,"_cnpm_publish_time":1663769637692,"dist-tags":{"alpha":"11.0.2-alpha-20261126100851-58d9782f151a975e802f1a545a315263d8d886a7","latest":"11.0.1","rc":"11.0.2-rc-20261124205929-9595907fc2bef8a397343bd288fef4685ab9f508"}}