{"name":"@envelop/parser-cache","version":"5.0.6-alpha-20230218002002-deaf94fc","sideEffects":false,"peerDependencies":{"@envelop/core":"3.0.6-alpha-20230218002002-deaf94fc","graphql":"^14.0.0 || ^15.0.0 || ^16.0.0"},"dependencies":{"lru-cache":"^6.0.0","tslib":"^2.5.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":"deaf94fcb4113e576c7a6d69b327be8eef4e807a","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.6-alpha-20230218002002-deaf94fc","_nodeVersion":"18.14.0","_npmVersion":"9.3.1","dist":{"integrity":"sha512-ItOBY9e6+0JOS08MV0Ww8o3bZ/zvq48ymiTAH8GuOPeEL1MiRkTEHEkoX6htRy3EzWiAB9gk+HUuAB2S68kArQ==","shasum":"492e4c1eb761a99f055835c4aaf6998a267af480","tarball":"http://registry-npm.ywwl.com/@envelop/parser-cache/download/@envelop/parser-cache-5.0.6-alpha-20230218002002-deaf94fc.tgz","fileCount":7,"unpackedSize":6301,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICQRMJx4x/ZOnnyP1DASrDfqmJ0g8rr5nZwEi4hFiEJGAiEAipjI67GqiGezWX8KlmOCvRO1ncHvLUseSL8OOCi7jt0="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj8Bn5ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmorsA/8DRav6yxev3RcIXxuKkDiT+pZrDfJh7Vc+8+ecFNA7sY1zKkg\r\n23y/3t8HGxTWZ5aiivpcPioXnmyqcN7jc0p7xQELuS6GdqgMDBtQb65xl1z2\r\n1eZbaDuoD53pA5tvoKdXxi7M5sBPsZImvYrzk3w8cyjSvZSH55nWzMhxZvzh\r\n3HFnjZzY15aIm7CxQ/FsAlMtrYtuqBi5QSOBjSBTKFQWWheURTrBrpnV2pAF\r\nizyL5JTDN7G3PcJS2NhcJRYDE5iSl0RWmMFpopEdQTpRKUwrQ09rl/2po/xy\r\naqiGMq0+lpBPQi7Uo3xKcFoogs4ZkjTZaNOsZhaFtFQWQ7QQSclaic+TnM57\r\nXXgAVwOBp2p8VE4JDw8qXJyhxWjlQZyj9UPkHsLcGCL4WZFRP+QYvB58FDPW\r\n47H9ei1lk+u9BllHsxjT0WFNeIB7UhrVIes6vnGtBSWQ/5p3qE2XXP8/xPm4\r\nsiOU+Og+jICAgzqwgAC+I5f+SSOt9O3OP7RSrVYEPOWnEukvHz6aWKTJwWpj\r\nURVJl8Mkw5skZdRtaP36EES0SohOnKW22hmMLbtI8dknXD1t2vwDEIWqEi4b\r\nwb/J7OAwl+jT4Hg9P/9aFBw3blDgeSat3YdGMuSEtpTOIx+EHIY56WEEatMe\r\nQQkLRWqDV8ivNp9jZSsFNrhW80AMyv0XEzs=\r\n=1BSh\r\n-----END PGP SIGNATURE-----\r\n","size":1777,"noattachment":false,"key":"/@envelop/parser-cache/-/@envelop/parser-cache-5.0.6-alpha-20230218002002-deaf94fc.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.6-alpha-20230218002002-deaf94fc_1676679673179_0.3215571682181664"},"_hasShrinkwrap":false,"publish_time":1676679673334,"_cnpm_publish_time":1676679673334,"dist-tags":{"alpha":"11.0.2-alpha-20261126100851-58d9782f151a975e802f1a545a315263d8d886a7","latest":"11.0.1","rc":"11.0.2-rc-20261124205929-9595907fc2bef8a397343bd288fef4685ab9f508"}}