{"name":"@envelop/parser-cache","version":"5.0.5-alpha-20230211225405-55a1c9a4","sideEffects":false,"peerDependencies":{"@envelop/core":"3.0.5-alpha-20230211225405-55a1c9a4","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":"55a1c9a4f1ec941ff8e04bb7bb18dc2a407f73ad","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-20230211225405-55a1c9a4","_nodeVersion":"18.14.0","_npmVersion":"9.3.1","dist":{"integrity":"sha512-zHIhyTBw4Jl9NqFSYVx1hD2CvuZQpHGt4jvvFbmPgjcE3TUCz1OMszjVFhCmXr9+whQiH90NNpfIpDj9V3Fjvw==","shasum":"c3e910fa83664b65b93f145076e78fb7f75fa327","tarball":"http://registry-npm.ywwl.com/@envelop/parser-cache/download/@envelop/parser-cache-5.0.5-alpha-20230211225405-55a1c9a4.tgz","fileCount":7,"unpackedSize":6301,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEAZ6RJz2+b8Uaz/wdNOIQdqJQofzkcaslvI6r9B0KKmAiEAsYabTZjLcna7DMvR3kTpE7kr+qC9d67i5bURuu8SQm4="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj6By4ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpqjhAAhclPVjMtvXtywAN0SgpysyHsSGMHavbDdwjHfd8tJEaogX1f\r\nAg5GZgBHEGhrgHOO2f0OKIbY9w3/gKa/xxhyuhzbaLiCNlsdhtxbOwXoRKyF\r\nU1BhXZY+E0Ts8nvp59+awQupODBKHOe7Kbpf1JUX8iLYQPuvtoFPXh4pxrQ/\r\n35gOUkaFWu4LefTR3eLRddaEtvvf8NJPbwBHB6rg23gUgL29FKxXS0kFLN0S\r\nVNTd4/bDYtixeHM64PKgXG5Tvd/6WIWyFfFmEQuA7k756ZNqRXJGIf/TTAcP\r\n9++ZAPfjMpy1bOip+ENN//uqlCmn/V5A6+C3bTWZYYV1yHkchX/0ydXhPf0M\r\niWCFhJg52guowQLyhPxJLFDp5SA8KobNDBmoMqP4wceXno8uLs47pgaUFiFy\r\n+S0Uac6Ht7x4nKNjPSZszt6yOY03ctiXPx/Hp/RFIDASpIbArlG6uPKmiOk8\r\nvTtySelry0za3r2Mj7yrZWi++nyo5fPQmf6bsDXEz2LSK4ASzjoBqg8ynZiv\r\nIRtueX0wEsNq+9oXzPnltK/MvKXI+IlW/ylHcelPlLHJPa+P3zfF9FVBW+ny\r\nAgAmoD8g7nT34wyGfgjCjv9OjBv00YcA/5Vs2PbopOs/XUNpk+jnnIZQzQZs\r\nHhaBD9B4fngWmRGv2fEjgyz5NrXWSCxbwn4=\r\n=uEsi\r\n-----END PGP SIGNATURE-----\r\n","size":1777,"noattachment":false,"key":"/@envelop/parser-cache/-/@envelop/parser-cache-5.0.5-alpha-20230211225405-55a1c9a4.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-20230211225405-55a1c9a4_1676156088434_0.7191206872695759"},"_hasShrinkwrap":false,"publish_time":1676156088673,"_cnpm_publish_time":1676156088673,"dist-tags":{"alpha":"11.0.2-alpha-20261128215215-f5c2b4496421cc6a5d7ab05963a2fcd9f764a3f6","latest":"11.0.1","rc":"11.0.2-rc-20261128153553-ce32f084d4652ae888fc083e7511d0ae9726aa8a"}}