{"name":"@envelop/parser-cache","version":"6.0.0-alpha-20221013150034-9758afb9","sideEffects":false,"peerDependencies":{"@envelop/core":"4.0.0-alpha-20221013150034-9758afb9","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":"9758afb9d1e1d4037cd7b7f0f9171d1760a5840f","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@6.0.0-alpha-20221013150034-9758afb9","_nodeVersion":"18.10.0","_npmVersion":"8.19.2","dist":{"integrity":"sha512-cw4CywzdXquxDgdfuxJHC4v+7bGqHhLHrONyUPXEPW1s4xtAj7IRUuc4BUMEHnr7McgFS6+cxgDcjASKOl9N8Q==","shasum":"6dc16ba2c525c78f271aa6ed149a7983bef7a57a","tarball":"http://registry-npm.ywwl.com/@envelop/parser-cache/download/@envelop/parser-cache-6.0.0-alpha-20221013150034-9758afb9.tgz","fileCount":7,"unpackedSize":6301,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFu20fMqpmQkpxzlU/7kscLp3BibTFwJVwlrg9VMhlolAiA7wwmfNlK29EFMslHIouaNOcCuTq/Ip99BLvUNeSLPkA=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjSChBACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmonsw//bOQZaxjVVObp3lo+LEjf+kpNDSSLgNcdJnLbuppVTiiiWzhm\r\nmbHWxbgzSm0BBQBHNoDbejzNvOz5sRNx4PDGm+VrsXjeGLu6LWYN/jt3k+kn\r\nrMRLcr+w/sPSoLWvQnZoA/PWqTUAGfjBM0osETj7iheeckzxy7tcLe87W1Pr\r\nvm2K06NhFtleyyVqqJxXwKOh0R0Dzmy1/gqLQwvz0xkY3jg4B1I+r/ShaOIm\r\nYsxkLwlerBPMgSm3YAT82Uj25F8IOFXIyY0i2voyIRO/l1eam2Ob2dKQQ8oI\r\nnT5SmCV/koRn55so7yemmUst5HybRVeD7umkuElLTav8FJP6iDC9+2dn1JwE\r\nKrwUvGjz/OidWFEF+8CZmHdnoAADlAo2Orcfa5MctLh/9JXqJvwaVRLE/7mh\r\ntROU1mDQVgPpxQJTdAlQrAg6Hrhj2YeZ6hwISjMgxJ77GewT05eyAkBgGMZX\r\noPCai98dZMA3cWGDIj2SWWC5wWu5XpeECkKASp3C598qBOjo/Bv5eq14AmyA\r\niWnGYdOKTMV+vm4oHnYxAguJ5qr+K3xaoGEgANuLEk4vOHLyb1uSNPEIgaTh\r\n+4Og2/VrlmJViqSJcokwl8uZYYTT64iZHnJgv/Vr7FCPtQkuy2EAbMKD6nHN\r\nJ2Dt7FOHZH922O6luCn5n6BZ9OBBQQGbdsU=\r\n=BEaG\r\n-----END PGP SIGNATURE-----\r\n","size":1776,"noattachment":false,"key":"/@envelop/parser-cache/-/@envelop/parser-cache-6.0.0-alpha-20221013150034-9758afb9.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_6.0.0-alpha-20221013150034-9758afb9_1665673280902_0.11417771685274891"},"_hasShrinkwrap":false,"publish_time":1665673281065,"_cnpm_publish_time":1665673281065,"dist-tags":{"alpha":"11.0.2-alpha-20261126100851-58d9782f151a975e802f1a545a315263d8d886a7","latest":"11.0.1","rc":"11.0.2-rc-20261124205929-9595907fc2bef8a397343bd288fef4685ab9f508"}}