{"name":"@envelop/parser-cache","version":"5.0.0-alpha-20221010161746-aafb7ca1","sideEffects":false,"peerDependencies":{"@envelop/core":"3.0.0-alpha-20221010161746-aafb7ca1","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, 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, 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":"aafb7ca19089c14eb78e44a058df0933ceef506c","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.0-alpha-20221010161746-aafb7ca1","_nodeVersion":"18.10.0","_npmVersion":"8.19.2","dist":{"integrity":"sha512-ffrRq9CbsRDRBy22dQQ7Iw25RzbFVspwOXqsQL6oGlcofTll6NGLR9EXtxOPFkeXi6U4QJ/PyAvUExdx45Z5vQ==","shasum":"9ab0360620934482bdb702c1e2ff9864c3b2cf94","tarball":"http://registry-npm.ywwl.com/@envelop/parser-cache/download/@envelop/parser-cache-5.0.0-alpha-20221010161746-aafb7ca1.tgz","fileCount":7,"unpackedSize":6269,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCktlI/GLqQwphcpMpbTC0f/cL9IWPpeE99/BaQ9jbhigIhAKzG5oh/NUmrPP3kIKCtdvjgeH0jiizfhjv6Z1MDkWKj"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjREXRACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrROQ//TRKCaJZXHlCZvhYG29MD/IarCsQFZVswR/l/4mW8YXSFBTz6\r\njhADk/KNx7fKPlsdgVYWut9cvI00EdBkW2cwL0o4Qq1fAtgBU42p0Naoriiq\r\nqNOPn4k4R/3lpooxCudz+QSrfWV7VeGU3OcLDveBw6442zG3SW9pHZP5Czh3\r\n17VnphJ10qWtIVZzNB+ZVhx3VYcm8rtNyCEU4t54MaWRxaLq8I3K0+p5Uxx/\r\nz1z/zfegW5oqMwF9TlcKu8Fm3yWh1Uc54l3HRB0Vu51W1xjD8XuzFnkKq+FJ\r\nL0N4R+0aHVHS1gl8OI2qY8/2i+jb/2sgh6Tkk5zgPqTMPG6O+jSM2g/oAfVf\r\nz3WMTwyIHhu7KUlpCWJohFd0op4p8jkcptJfrqvOjBL/nyxU5aYxxteedpXD\r\nf8kEAKA18XSIIyWg7+tsUmmn4XC4TLW5uDS2h6y+1gbjL7Tqw4pUVcGiOpQF\r\ncLCGTx0LGJjaXkV9hTH0iAQkCjDEAwFaWK1u0iE1kPHZK5SAf0unQh4QETnj\r\nmqeejav41nEzrQidMdTP/InPFwDj+tWQYLEzNZAl20q7riA0zo/nKhS2uYUe\r\ngtDy+BMDnWPU4hbR++iCV0cl83shbjTveYTIofwpy+zknpz35eVwV1TqdteJ\r\nizZIBZk5NbICDCkBro/1nRnEcWj9cHzSRhw=\r\n=W6Ic\r\n-----END PGP SIGNATURE-----\r\n","size":1766,"noattachment":false,"key":"/@envelop/parser-cache/-/@envelop/parser-cache-5.0.0-alpha-20221010161746-aafb7ca1.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.0-alpha-20221010161746-aafb7ca1_1665418705813_0.7076427993836525"},"_hasShrinkwrap":false,"publish_time":1665418705955,"_cnpm_publish_time":1665418705955,"dist-tags":{"alpha":"11.0.2-alpha-20261126100851-58d9782f151a975e802f1a545a315263d8d886a7","latest":"11.0.1","rc":"11.0.2-rc-20261124205929-9595907fc2bef8a397343bd288fef4685ab9f508"}}