{"name":"@envelop/parser-cache","version":"5.0.5-alpha-20230211132115-0cdda41d","sideEffects":false,"peerDependencies":{"@envelop/core":"3.0.5-alpha-20230211132115-0cdda41d","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":"0cdda41d62fe889d2b0eccb8c481447179a77741","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-20230211132115-0cdda41d","_nodeVersion":"18.14.0","_npmVersion":"9.3.1","dist":{"integrity":"sha512-WF6u57w/ej10Ikd12hHaB04L+r5vrooFePX2hG1kfYxTZnN93HgKTeut2hLaB+KcS0g4Km0+JNBz5buV0BMsiA==","shasum":"2d947b1fb084d387571017b526fd6fe1b1a2bda9","tarball":"http://registry-npm.ywwl.com/@envelop/parser-cache/download/@envelop/parser-cache-5.0.5-alpha-20230211132115-0cdda41d.tgz","fileCount":7,"unpackedSize":6301,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDUAqdoa0EVTBR8Zfq3G4xtz+xmRpB2O/6ghH8jFR2z8wIgbyj09WKXDWh2+0B92iDKeZ8JH+b2EvLaB8DV6fuMwbQ="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj55aBACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr9JQ/9H1kwDCtj7JL0C8P34XBNADTeRfwNGeqEZvclYVVW7tSrHjff\r\nC3Bodr/9N/f8MH1IBc22p+mm2Z8I8oR7fYkswpuzCetzVPgU6arpOSWyOOmE\r\nexHsORYmdusqUbmTd8CJ/4B1/PeQc8fk6NPXu2n+jW8/TZwRurGyZL+XKAHQ\r\nMW1bK/h4Bx21IGGPOoHKqXbYKY+yk84UHAVAPOpLWGR13ktzBLZtfuiplkmv\r\n8drdWad5Qdz5EAmxY0b+aEKPZ9kuQvv2E3+Wx95pF/kn0R4jfLs/s6WeBY5U\r\nWrFXy7L6odiAR0oVGXyq0BtMgflvuKVKNi0NhZex/56SkypN91YF0Ucg5W2y\r\n2V2nT/cvdavSjXFIEjCvaPy3rLlZtb+1DjjmC2fuvSyEgF3uHyBp76d6W/Bj\r\nOZ+rDBTWW8nBvIcQgNqsbwBa3dZDlpr3nNXQD7iDrOKU+C/yKFjvMlb68mZC\r\notXAUR27SST4tT7/KwvYPiuyyOz739z9wJHojmTJazigvkPUWnGd8TafKw+Q\r\nwLc5g6IFUvUWmFufpEo/2WnGtU5qrpADrLIwLvW9M6jXaoxS6Zmd4rNqjhk0\r\nDg4M2QA2wKnrh80QcfEaopvQMC+71hWsK4FKxeQC+lEhMwgjAs3MSpxQlQ3n\r\nVjDgyRRcuthuEfpcpJevA3UEer/D/t/0Rgw=\r\n=mQEq\r\n-----END PGP SIGNATURE-----\r\n","size":1776,"noattachment":false,"key":"/@envelop/parser-cache/-/@envelop/parser-cache-5.0.5-alpha-20230211132115-0cdda41d.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-20230211132115-0cdda41d_1676121729071_0.49892580039911616"},"_hasShrinkwrap":false,"publish_time":1676121729299,"_cnpm_publish_time":1676121729299,"dist-tags":{"alpha":"11.0.2-alpha-20261126100851-58d9782f151a975e802f1a545a315263d8d886a7","latest":"11.0.1","rc":"11.0.2-rc-20261124205929-9595907fc2bef8a397343bd288fef4685ab9f508"}}