{"name":"@envelop/parser-cache","version":"5.0.6-alpha-20230218015643-3aeb66b3","sideEffects":false,"peerDependencies":{"@envelop/core":"3.0.6-alpha-20230218015643-3aeb66b3","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":"3aeb66b305cb64cab49c226f23cd1e58b70c1c22","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-20230218015643-3aeb66b3","_nodeVersion":"18.14.0","_npmVersion":"9.3.1","dist":{"integrity":"sha512-ui1t7Rzgg2NYX/1jLiw7jUdmZSZ0jIuoOx/Hvwgj61U/5w5Dho0SzSR6EZ34grFeA1Wnt12gY6otN3+u3YsSDw==","shasum":"80108ebe56e869a5ac14a93d9287e11054f8f40e","tarball":"http://registry-npm.ywwl.com/@envelop/parser-cache/download/@envelop/parser-cache-5.0.6-alpha-20230218015643-3aeb66b3.tgz","fileCount":7,"unpackedSize":6301,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGg2Q0wlIKG7viUVKhpZfZZcASuqCaSKCbwq3umf5kIHAiEAqT7kmptbH8HmcHCbBM0/WOvoVqQZkwi+u0Z3+Btslnc="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj8DCNACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpehA//VAshOjdaQjewhXrOvGtwIP7I8p7DfUKcVZtYdaxtH6b6e3NX\r\nj5vLkljEI53qS0aBvz9bGJjRxin9H2TA8LY4lvqqmS0lCGD+Do66XuuKRimQ\r\nu43dBvZ1EM99c6bQ411ZHEFJ3tvhx91GZYZdAELq/JdfxF7w6QtK3G6W+jd7\r\n8HL9asAZKGjympEaPY7NWm4xevbaXyCCAnmgsX2DlQkXErfv601bS77M+FhR\r\nDgxgMyBGJDkQTnvyg9TTxvBBTUTk6rHBKpRmydQK65kCvGycP9aP/F3zrg6L\r\nPH3QEeKQkyHcUa8qdBFpPp9JLPkywAphEhnkA5ocxMJTS+Ghw04VIDbAgdXL\r\ntMXi4g6FpcGhZHlnZtN4YTry3NwGV+Czh/MIW4Q0IxlYx6nUp0Ig6bssB2by\r\n2KXyTd8Nuzepxki7pIOOjsPUnh4WDrQLN8SYx8hp4DOmk+1FXxPlkHMdyanw\r\n5nvpySmwUsz4xbTP3Im2sezhzuh1LPv3hhc/DhnXjHZPjiqr5MjwvJOhoQfC\r\nGQI+d5cLvH1DMxs3Y9Uznz2DLWjJ03o7Cv5/7oiXSe2AGOb/kXX79GbJEc6q\r\nbkdLMdxSSLdV0zuLbllxxEc0OzCFgO5D+AIGRxH6cvT9/S/93/954V4dOsGA\r\n4XnWt+UpFXFtlrIfd/O6jL9NslUyjYjMh4E=\r\n=AdUC\r\n-----END PGP SIGNATURE-----\r\n","size":1777,"noattachment":false,"key":"/@envelop/parser-cache/-/@envelop/parser-cache-5.0.6-alpha-20230218015643-3aeb66b3.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-20230218015643-3aeb66b3_1676685452819_0.14296196955652296"},"_hasShrinkwrap":false,"publish_time":1676685453009,"_cnpm_publish_time":1676685453009,"dist-tags":{"alpha":"11.0.2-alpha-20261126100851-58d9782f151a975e802f1a545a315263d8d886a7","latest":"11.0.1","rc":"11.0.2-rc-20261124205929-9595907fc2bef8a397343bd288fef4685ab9f508"}}