{"name":"@envelop/parser-cache","version":"5.0.5-alpha-20230213093131-cc7bd99a","sideEffects":false,"peerDependencies":{"@envelop/core":"3.0.5-alpha-20230213093131-cc7bd99a","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":"cc7bd99a20056c21afa79d5f1c8f6256ff5af48d","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-20230213093131-cc7bd99a","_nodeVersion":"18.14.0","_npmVersion":"9.3.1","dist":{"integrity":"sha512-xuqE9cbwJp1h0qO+L5oLC2e82gJ/v7+sLyod2T68ve4xdqQ8kgu6FmsW3FTnv+NVuRlqrN0pJughgj7ocmg3nw==","shasum":"dcf8815dac469c0f8f6b87fad224c84e7fa5a0f5","tarball":"http://registry-npm.ywwl.com/@envelop/parser-cache/download/@envelop/parser-cache-5.0.5-alpha-20230213093131-cc7bd99a.tgz","fileCount":7,"unpackedSize":6301,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDJxNx1RqTBXDthzVAc3hJPeJbWjFSgzunSMXXgqrxDWgIgPzFndcjkwaImDWpnZN4fKtVYumTAXQvBk3zo182wMc0="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj6gOkACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpFaxAAiook7FSHl1cWwveSeetgJgIlpbJz8sp0EnAoBPku/4tENreq\r\n/bEyC8K4HlXf0PaPWTjbFxtPsEnjAN0g6fVTGVNYk68d26mk0Lc4pT01v/oz\r\nfEBptLgcRkPw47/foHQ38rQSTBlvreUoeiTJ0OspKGHAkmqJ2qrsCzyKyfim\r\nwZ2bxAKVrC82OvJqyyIz/Ze6ey3Mzmmx9Hf1d5uPmKR5/sgrhDMruqi5JPeN\r\n5u6GgRYNaf9cdTGoonuIv7kdtMESH4qC8BUAzDHgGshUKyXON8YERwq39+9k\r\nnBAGVe/JFgQgwHky5ix0cYodYmBY/VPwVD8+jaHsSp7y6Gzi8yPTDOsY3D5v\r\natgXuE4VH3ewjz+2MJ8CCLEF70lhULqcqZHgvEBEdMVg7s1byQ4NDLMx5gZX\r\nC+aF815ZzbjuwUpgvz0kszPvUBPWsR8um3fqjB0YN8f1HgdjLHCtjJoCTeXB\r\n4j2T1B8C5iZeUL/CY5An9tIh71ZdYYEHX2FDIwiKQVfKuT8YOvLihJX68wzO\r\nd7ybgB5cQ9aT29atiWZ1q6zepGs5nwtY//pMwddI3uH4G4VRosuN4essxb5j\r\njKrvVVzct8M+5+hqE1qFbVsmzOiZmFdF8jxMlJDqD03CrmpVnoF7o7QGUF84\r\nh5UWnsZ4tG+GnEOsUTeiDApnk/gbcIrMQ/4=\r\n=Sp3i\r\n-----END PGP SIGNATURE-----\r\n","size":1777,"noattachment":false,"key":"/@envelop/parser-cache/-/@envelop/parser-cache-5.0.5-alpha-20230213093131-cc7bd99a.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-20230213093131-cc7bd99a_1676280740803_0.9102454098238755"},"_hasShrinkwrap":false,"publish_time":1676280740961,"_cnpm_publish_time":1676280740961,"dist-tags":{"alpha":"11.0.2-alpha-20261126100851-58d9782f151a975e802f1a545a315263d8d886a7","latest":"11.0.1","rc":"11.0.2-rc-20261124205929-9595907fc2bef8a397343bd288fef4685ab9f508"}}