{"name":"@envelop/parser-cache","version":"4.3.1","sideEffects":false,"peerDependencies":{"@envelop/core":"^2.3.1","graphql":"^14.0.0 || ^15.0.0 || ^16.0.0"},"dependencies":{"tiny-lru":"7.0.6"},"repository":{"type":"git","url":"git+https://github.com/dotansimha/envelop.git","directory":"packages/plugins/parser-cache"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.js","module":"index.mjs","typings":"index.d.ts","typescript":{"definition":"index.d.ts"},"exports":{".":{"require":"./index.js","import":"./index.mjs"},"./*":{"require":"./*.js","import":"./*.mjs"},"./package.json":"./package.json"},"gitHead":"6f4284b5534db61866a3cf7d7272f0dccab98b7b","description":"This plugins adds simple LRU caching to your `parse`, to improve performance by caching the parsed result.","bugs":{"url":"https://github.com/dotansimha/envelop/issues"},"homepage":"https://github.com/dotansimha/envelop#readme","_id":"@envelop/parser-cache@4.3.1","_nodeVersion":"17.9.0","_npmVersion":"8.5.5","dist":{"integrity":"sha512-IqerCVjvVTiGvSZ8qSpdEc55hhiuekufJd0+ldWtyMPznhMaYOzpLifFUhjhhD7004eJM17n9vjJQFa7fIGz8Q==","shasum":"3d9cfb869f5953bb866f3c82e28fc8606b576a60","tarball":"http://registry-npm.ywwl.com/@envelop/parser-cache/download/@envelop/parser-cache-4.3.1.tgz","fileCount":5,"unpackedSize":4931,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCTa++cXnsQo1tqD9lnLUsIs/+EQLOVd2QDmEK6qcjECgIgDmsU59LQ85/xF/evclqqaPuu0Xb++BXtGYBbadivCsw="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiUW2NACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr5VQ//ZDFzKRrFtM6J9UbcUfdwmmqpUtGd1fMf51FsDp8sOyKKkLeD\r\ny/M8WtPgPtJCVIrRVgWJgum7rKBJZJgHpkVP8sXPqx0p5bmo4dbJGO5pOORx\r\nfgIEevOB7SDxr6hjzxj1zd7Jlvt6nhXAPlca3QzULascOtWmEdZmLlmtTq57\r\nMynJOlNpUutOQ+F99NIwlDzssbDFcu8/J89PObVAHK1A6JSkPB1ZckPCRXaQ\r\n5PLU81bJIc+XTFmkuywyk2SZMADV6P/8vtgtP/eTi+9tqY/jkRQvWTAhBWPu\r\nCTPtRP9Qe4NIOENGSuaKEOyxYJt0IdrPNyn8pvq/GU/MSqeYRgHMtPYiV560\r\ndgicbcivRXdZ7oBx/wbjsRyhKMRzv2bRT9BHRbf/PAZxvRkphXzC6ioDa/+c\r\nQelwqog/PlvScAQq97FqEgtQvsuUME9qr/tm9H2P/+80bgvUQtuTvrn6A5mD\r\nWLzV5BoKlr8D32rbbaLfRRobu6hribCdEm76wBjqOtr0CjRqt6KzpgyYRybA\r\nV12DqnLkdoRmHPQk3e3dq7txB3cke3z6OCyIZjPSA9x8/j2GcQcnVuExkPdx\r\n8ur1qDcgSwha8R3MXYAvGSUvc2Odsk/RlRta3xCyK9Gwb7VZovf74Bqxzer7\r\n4DwqYIMbhspYclAFn3EX12mM01BNemhQSDc=\r\n=R9me\r\n-----END PGP SIGNATURE-----\r\n","size":1570,"noattachment":false,"key":"/@envelop/parser-cache/-/@envelop/parser-cache-4.3.1.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_4.3.1_1649503629642_0.24632439880307877"},"_hasShrinkwrap":false,"readme":"## `@envelop/parser-cache`\n\nThis plugins adds simple LRU caching to your `parse`, to improve performance by caching the parsed\nresult.\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 { execute, parse, specifiedRules, subscribe, validate } 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\nusing 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\ndefault `max` and `ttl`.\n","publish_time":1649503629814,"_cnpm_publish_time":1649503629814,"dist-tags":{"alpha":"11.0.0-alpha-20261019231601-b21e6cedc1a444383d9ce69fe6180f5b4ff67120","latest":"11.0.0","rc":"11.0.0-rc-20261022165416-7c29decb398764e6ac3915e1c539c478cbf19237"}}