{"name":"@envelop/parser-cache","version":"0.2.1","sideEffects":false,"peerDependencies":{"graphql":"^14.0.0 || ^15.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"}},"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@0.2.1","_nodeVersion":"14.17.1","_npmVersion":"6.14.13","dist":{"integrity":"sha512-i4E06Es6+Sy5cshIay+ZUhn/m5VltLz/q5RSfVqX0xHvBvZ1Iptctl72O3rBs9w3jTxwEI1ujOzydqEdHVgMlg==","shasum":"46fa6037e9164c648c8e477cca04018032cde59b","tarball":"http://registry-npm.ywwl.com/@envelop/parser-cache/download/@envelop/parser-cache-0.2.1.tgz","fileCount":7,"unpackedSize":10016,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg6+TOCRA9TVsSAnZWagAASEQP/jsMkQptXmMCz/OlNvPz\nIC/qRpLw2xVHKFrqv/e0By9PMC1K79ScBiIFKT49sx7CnhWYOiJvA66IB7Wo\n4DZimIdZqUOv5RPAUORa3VoOj7IprjatlHj8KpA8jX40v+S2Qaz27fdNRkRD\nN6E3u8HOGbY+vXs9xtiSvkqSBNKvpj0kdpBXdMbJEEYnxmSDVK9e6e3wMcRA\npffH4z87k/EbrlhiAiUka2zA1PTL0Qz+gxlBUhXlzgwG+ZfL44MNaiZag4uH\nLW1npcL6rUCehccACFBZ8pm7PEV0eKExMj8ZZYLJImW5Gx44G3JykaFCHDKz\nBYnquKgeaOCevnuWTy1Y1XQ7WBWFKRjSMof92GMVXm0sMV8bQ93kXMs/rqad\ni6NOKYQa8NrEWjp8V/1SgXW2vO78IpZbcT+GxSNp3GAVGKyLlm+wfMBkouwz\njMk7zsXbjxNuwctzT2z5MtyrJs8zRK5O7MnnGt9DK7WsHxhgAums0I+xUj7r\nNztCOLQwoAI/8nOLMOYHMlA28dUOfaE5kxi7nsgbswr0JRjeJdzgW1ydgkn8\nDbvVNYZO9Bo7fNOXbFMumszvljeGjd/ASfvSm6GpLxIJ4NikIdYKHicXzi+A\n5NAisexFgUIKjNaeiLJdzd3c7xr6AHSk2xa3d2zh+aPADR9ogrgnteFvyX/i\n2LoB\r\n=03WX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDkNq110H4acPwqvvXgHnNnPh4jTZSGmOFv4VrRQIf1TAIhAI82l4+pCZem9sa1/69OxNNa7zEOwT8ZV1gi2RPicHt+"}],"size":2196,"noattachment":false,"key":"/@envelop/parser-cache/-/@envelop/parser-cache-0.2.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_0.2.1_1626072270326_0.6828182126193372"},"_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":1626072270442,"_cnpm_publish_time":1626072270442,"dist-tags":{"alpha":"11.0.0-alpha-20261019231601-b21e6cedc1a444383d9ce69fe6180f5b4ff67120","latest":"11.0.0","rc":"11.0.0-rc-20261022165416-7c29decb398764e6ac3915e1c539c478cbf19237"}}