{"name":"@envelop/parser-cache","version":"5.0.5-alpha-20230211193653-abb00e7c","sideEffects":false,"peerDependencies":{"@envelop/core":"3.0.5-alpha-20230211193653-abb00e7c","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":"abb00e7c40f21188fef8aa9329717ca17ee6de13","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-20230211193653-abb00e7c","_nodeVersion":"18.14.0","_npmVersion":"9.3.1","dist":{"integrity":"sha512-ow+CQcKo5OA93cq6m7qGv8I/bKneI/l42dA9Q9MV7MziPixr7BMjuZusvGQvAumu2m2OFOsRdkOo+KwFrck3/A==","shasum":"4ddd5e722b6224dee64dbcc4423c98f35ecc112d","tarball":"http://registry-npm.ywwl.com/@envelop/parser-cache/download/@envelop/parser-cache-5.0.5-alpha-20230211193653-abb00e7c.tgz","fileCount":7,"unpackedSize":6301,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCaHzd/q/bF/khGbELOs0pK7i/je6vfJWYLncXeBG4AMwIhAJicZ3Lcp0qE9l0FETmbiUmWfNH54JGne3I5LO5AG/Ys"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj5+6CACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrcgw/+NNxgq4e4gj7aOqPCIuWTEzCcaOKzE9m4aECXS4u9brAqqrab\r\nfdW8DosCmC9d7fWAcWjEL1u45E/hN+va6f3Ne0FPCqL1qeGOJsTNA4FGzmo6\r\nFra8eew/Pi3I+FCzjC6/UkN7NNWYoU5sdR9/FGg4xNEC7Je8o6ARkyfd3rSu\r\nOXkSY6QoiE4YlQnLunkQvtLo8CWatSLeAxSAxhlmPowIpVlxjT/QZ9DgHAU/\r\nWwnZ9003cy0yQhQk33kWg1c5yma+sbFxYHTYzsgg05MXMQjSKa7aEyO55HIy\r\noiyNnBDR0Q7mKo58IspJEfDsgEioF9UvxRg0N26jFFU5w2uONjq7z8e57kI/\r\nv/cfdluHF36cGcuIqDIm0Aoj6VGOL8QB3H7VkAMTX2c+uO+o+oIHv7gqijdk\r\nWZiK2Dy9QXvxExobE9iWgDI0hQhsCkmO6TojOUVaAaik3hOmKspLtuPvtbLt\r\nO61EHXQVBHEkg94EBnyZ0hS8JsvVw1XQARJbsfzMvSpC2/v3xEYbbJ88qiYE\r\nHOY3e3Zn2Ov0F51lKEc1rkoUWPDBLwSf2tmnYPfckuL645doXoLhWlQi9yst\r\nnbXGb74gtU5M8gl7YnXXUCQmISqF1YCrg33fYIIrFFKY+0iDarLilfRdYGpV\r\nb+P6cChDfcsqWH5qqfV9uesRFD0ltv3kT0M=\r\n=G6Ie\r\n-----END PGP SIGNATURE-----\r\n","size":1777,"noattachment":false,"key":"/@envelop/parser-cache/-/@envelop/parser-cache-5.0.5-alpha-20230211193653-abb00e7c.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-20230211193653-abb00e7c_1676144257891_0.2783764811402971"},"_hasShrinkwrap":false,"publish_time":1676144258082,"_cnpm_publish_time":1676144258082,"dist-tags":{"alpha":"11.0.2-alpha-20261126100851-58d9782f151a975e802f1a545a315263d8d886a7","latest":"11.0.1","rc":"11.0.2-rc-20261124205929-9595907fc2bef8a397343bd288fef4685ab9f508"}}