{"name":"@envelop/parser-cache","version":"5.0.5-alpha-20230212044122-f8e9d886","sideEffects":false,"peerDependencies":{"@envelop/core":"3.0.5-alpha-20230212044122-f8e9d886","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":"f8e9d886fe7a987cc89be6fa11dace51e3787cd6","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-20230212044122-f8e9d886","_nodeVersion":"18.14.0","_npmVersion":"9.3.1","dist":{"integrity":"sha512-zWyX4YSD1Ca08BkwStCvL0qO+JO2Wy6/zJPW+1zGDx6d83sAI3ZPLsppb3dU+jgrbmgCIpJY2RP92M2N4oOLEA==","shasum":"0f80086f192dc5bdf9beb7a501c3a29d9a2b9494","tarball":"http://registry-npm.ywwl.com/@envelop/parser-cache/download/@envelop/parser-cache-5.0.5-alpha-20230212044122-f8e9d886.tgz","fileCount":7,"unpackedSize":6301,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDE+GOIND3+w1rksFwa2MAxyu86vHWQm3lGr8S25sDdFgIhAPyOcOJK45jM+b6kUqkwYxsMzZbhkuB8eR5KOTX4KmlJ"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj6G4eACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqxzRAAkvui1ytf/53bBr3EyY0Ogu5+2gPtJlnRJR4uwLUL1Io24CJz\r\nRT10b4+8B1NaziAIcITZ2QVmnnshKQHzv64UWb19v+6Ha0kXJRSs5trv9QqO\r\nB/hquykK8y7YeCrpEvoM2uFc8Rjibx7s6OdTvECrNX66E7EW9z05HlZlFenG\r\nlcPtbX8tK4HaavE4ayvutIsT3gdvlNVXjv++MALkE8HGKrofGPFIGiz1jrzJ\r\nXAGFMDAa2hl4k9ZOD8YaHSnXqu3gKSQey0d762pw/oc1EX41e9+/9s1eocOv\r\n2ZBZYAF/kkDngd4ZrwKmUF4OPDG0+JzWOTuQ4dD1+tyyPmkivnYTgRLiFO6n\r\nSxVuuZf5YdPPDct3HsinMvSSheb5S3oAkp7YXMIyW9FehuIj++9Jpottc6Wd\r\nfCsYay8ZThKdPNlw4Juj428jar4aT7ijn7MB2OAwnG7mMHRuB+kU72GnmFtS\r\nJIVbMR98ouMg/PFjokSfGckMCtIGtpw/fetecy0t5Ir8cCenUaVNkoXqAwBL\r\ncMfQ1giUIBXMm2uikIWqM4yFfB4bmPD+FyDIe/MEmkGHjL+FZuV49+LQiMc4\r\nbCBQrpP6wIT5AodvINarMpE1E3d6anwrlOxGywTeP2+aZeKHSwalIp9p9nU/\r\nmX/In0h+W25bkRXeFZEqSvS2u6yHCR5YwEM=\r\n=i+Du\r\n-----END PGP SIGNATURE-----\r\n","size":1779,"noattachment":false,"key":"/@envelop/parser-cache/-/@envelop/parser-cache-5.0.5-alpha-20230212044122-f8e9d886.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-20230212044122-f8e9d886_1676176926041_0.7624898297721281"},"_hasShrinkwrap":false,"publish_time":1676176926132,"_cnpm_publish_time":1676176926132,"dist-tags":{"alpha":"11.0.2-alpha-20261128215215-f5c2b4496421cc6a5d7ab05963a2fcd9f764a3f6","latest":"11.0.1","rc":"11.0.2-rc-20261128153553-ce32f084d4652ae888fc083e7511d0ae9726aa8a"}}