{"name":"@envelop/parser-cache","version":"5.0.5-alpha-20230213100741-5eebe91d","sideEffects":false,"peerDependencies":{"@envelop/core":"3.0.5-alpha-20230213100741-5eebe91d","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":"5eebe91d018beb26c41700591e793ef4a0dbfed5","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-20230213100741-5eebe91d","_nodeVersion":"18.14.0","_npmVersion":"9.3.1","dist":{"integrity":"sha512-Ut+6kbhhJzvJnYMe0uT4JKH90icOfQblZcnw1TWrCLM/W2sVnWpD2uswKAhAV/BIdrnFEOMJNsN5GNSPaofBLQ==","shasum":"8eb587bf062a67f2feb37a28794a0ca6772b070c","tarball":"http://registry-npm.ywwl.com/@envelop/parser-cache/download/@envelop/parser-cache-5.0.5-alpha-20230213100741-5eebe91d.tgz","fileCount":7,"unpackedSize":6301,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDaFnEDLy2UIc4Mgbi3I5vJVhzwbO5MJjh+INR0i1NV7wIhAOfIYyLv1MepUteBWCnXH62f/8FzTjAm7DWMqyowUdLx"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj6gwdACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrWkhAAli49FKHnJC2uOmg9d+0rRrvWXldQLP+V2paGPUeaYRkbJnrq\r\n20RSsH+s79ZqzHPOLgBn4iB4x8aRHMovKp+PDIR5+daKyMxrm4WXXYY2XiIA\r\nftQX1r+309+OAjy4gosjZjfdzsuda0fU+zfieKAq49p5aiAtrY1Fz3bdj9Di\r\n0PwVy4LiRV5udDy2sfrl1KC1aO7G2xVc00DDOlhu+hLAudzCI9odYUyA+xO0\r\nBUWx80zLbcZn8mLdPOERE+4Y5IziP6zJx4FffR39leurhUcMgdt7a3lLwLoZ\r\nJg9q4eC/Kq5vE5V71a2dEdYhG7e44fmSh1/IIEjQUbO8TtjldemWLThLDgXk\r\nnG7l56xf+r0WKARdECVLZjSg3lRna1bBnBi8HAJppfeJvVr4A00f4g//4ZCk\r\nJB43jL2zbzBva/nwNbizvAtoU8dHLfGrUvkoEsFYHdnK8R0RgCzswqNIxqOO\r\n/cTm+REOXlcNRpeHCxsnI/8QlxHX0Nqpe6fvLPl56pRJ9NzRAO2PddYVhr4h\r\nx5p7s5d1r+2o6RWBY3s04BXSg7Y1AjT7yPP1Yl1GuzhXvsauMIkgFho77R6V\r\n3TQnejHIcvIEDWxV5Bm5B++UQXxWv4aRyh4Ol9Fp38iE7O2INuORdR94pO1F\r\n3SDrjAT+RdTk6R64mWCcQI000tMq6xijn0U=\r\n=n/QV\r\n-----END PGP SIGNATURE-----\r\n","size":1776,"noattachment":false,"key":"/@envelop/parser-cache/-/@envelop/parser-cache-5.0.5-alpha-20230213100741-5eebe91d.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-20230213100741-5eebe91d_1676282909354_0.9159145040134826"},"_hasShrinkwrap":false,"publish_time":1676282909509,"_cnpm_publish_time":1676282909509,"dist-tags":{"alpha":"11.0.2-alpha-20261126100851-58d9782f151a975e802f1a545a315263d8d886a7","latest":"11.0.1","rc":"11.0.2-rc-20261124205929-9595907fc2bef8a397343bd288fef4685ab9f508"}}