{"name":"@envelop/parser-cache","version":"5.0.5-alpha-20230212051145-4afef7eb","sideEffects":false,"peerDependencies":{"@envelop/core":"3.0.5-alpha-20230212051145-4afef7eb","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":"4afef7eb321d1900dd65d8d622b967b2498577d0","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-20230212051145-4afef7eb","_nodeVersion":"18.14.0","_npmVersion":"9.3.1","dist":{"integrity":"sha512-qZgn1MgrLoUzvUUx1pLN1U299RK8KZZ1PyjCAaoR4FHa7/aebs5ckfTLJA+m53pz69rslwA869iRDpDCsMcemw==","shasum":"6288bea4956aeac90d9b0940ba18f8231bcd1853","tarball":"http://registry-npm.ywwl.com/@envelop/parser-cache/download/@envelop/parser-cache-5.0.5-alpha-20230212051145-4afef7eb.tgz","fileCount":7,"unpackedSize":6301,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCKdqgMbrXc50en65Eyc/+rwO6Ny6iadMqhi7FZgUWFgwIhANyTCWcQ9l5eWHMCgR+5B7jhQhTYbFj3MewBIvFAOHuz"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj6HVCACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpeqw/7BtroXQcYqUzmXiZxQRMhL1EBQumLWP4t6beYolizcgUmSAVz\r\nzOj7/HOsB91vDB7HOaAV7anekC90Jxhxc9eONqrfBlp51Am8DQ8Z3LT7OQw1\r\nssK/3D0b3J/znawslOnOr1WZqwtDyiDyKM8F3skKsgEzXXutpKiRhP7y+C1p\r\nn3KZZMlwREYXbbIdoJlcdOQuMBF0s7w7Eu+nn38XSBmvtfkoNP1ES6ViMm+E\r\ni8FUSLDTGydyD64v+K0WoQRKmFDjU1VtR+fGzrjLZFlwD2ByCMNgFsvajjKb\r\nlJkl6Y+stk8pF3x4+nuprFRzF7sw69/ZnNOFAJSkKeur0dVwGG7qDzxL4XWX\r\nLicq7YHO7wIP92//TYIxxJHKSjZJWT+IXyoa9b80w1+DuNr2PXNxjuA7wD97\r\nkUeWOPxEnJVEjg+pcCJila/yY6V5wqls7XzSHXvEsIg3v3p6qGwlqPElLKGu\r\nMRmfEkE21OlF3Ax6/pckSSO3I5gUDK57eoHvAhXSj5Jz6xe724BAFf0bYdIy\r\nWhIHNTIVg6qd+wwluWvNg1mKB4KF/tAa5f2HDLZaKE1q3FiukTD8fuWe4Nv2\r\nOO9Fmj+by7jm0c+IRqFWOdvRL7oe1loBbcE8I0xP7un/XjPnXmm7fPIX2Jm5\r\nU7bn8VYxw97NTu1JJ3ujhTTPoB5l2k23F2c=\r\n=rVwI\r\n-----END PGP SIGNATURE-----\r\n","size":1776,"noattachment":false,"key":"/@envelop/parser-cache/-/@envelop/parser-cache-5.0.5-alpha-20230212051145-4afef7eb.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-20230212051145-4afef7eb_1676178754764_0.040399351259445604"},"_hasShrinkwrap":false,"publish_time":1676178754945,"_cnpm_publish_time":1676178754945,"dist-tags":{"alpha":"11.0.2-alpha-20261126100851-58d9782f151a975e802f1a545a315263d8d886a7","latest":"11.0.1","rc":"11.0.2-rc-20261124205929-9595907fc2bef8a397343bd288fef4685ab9f508"}}