{"name":"@envelop/parser-cache","version":"5.0.7-alpha-20230505095813-2dc6c6f3","sideEffects":false,"peerDependencies":{"@envelop/core":"3.0.7-alpha-20230505095813-2dc6c6f3","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\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","readmeFilename":"README.md","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.7-alpha-20230505095813-2dc6c6f3","_integrity":"sha512-r7xMn1pJZMdt49IdR9nFEyeR3cvyp88/nnbSvLIMoRWOb3DwfCe1TpPpogt8V+l7D++0G9jKQ8+cb5DOt2sqNA==","_resolved":"/tmp/9728d2a4122c5a08aa90a886412b5772/envelop-parser-cache-5.0.7-alpha-20230505095813-2dc6c6f3.tgz","_from":"file:envelop-parser-cache-5.0.7-alpha-20230505095813-2dc6c6f3.tgz","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-r7xMn1pJZMdt49IdR9nFEyeR3cvyp88/nnbSvLIMoRWOb3DwfCe1TpPpogt8V+l7D++0G9jKQ8+cb5DOt2sqNA==","shasum":"d73fa3ba064a24b177bd7a0c9bd8031afa662e53","tarball":"http://registry-npm.ywwl.com/@envelop/parser-cache/download/@envelop/parser-cache-5.0.7-alpha-20230505095813-2dc6c6f3.tgz","fileCount":8,"unpackedSize":7379,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEFYkvKVUAwccqLKn4cbQEoTRmmiOspmS2EhMtqg/cePAiEA7AYTPkYtCKIRzPgAuUszZIPU/2Zq8LQo4P7+sIF9bNg="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkVNN1ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqthg//Zdxbe5w1GlQ1hHk3rEGVntoDRODKEkwdwgpuIQuGVDJEs5I6\r\n49HYUSyEQVrBECc4Pdgz8XFyLcFSSfzbyQjecu/36DzURSDXbj2F++PoCCYr\r\n1zuTyXmUkM7I+feoUrwUuMi3PacAaChdQcINwa9i91YCP/OB8CO2SZaiTtRi\r\nqygY6FZq3LGPzuM3Y7I1r8esHpJxjnpJKBBUF4MQBVZwEdCA5R00QDP0IZVJ\r\n5Sc9PD+5nqkViEQZ17nXQCTKW0oyTmr4GNktqqkhGwb+BFBQHABW/prgqwsG\r\niy4wa+5iUwdmUiYIzOdbK5AOdR0/pMglSGqn+6475nIQSRePvx0Frvg4Ah24\r\nkQihnhBY+JCD0E11eiHcis2D09nOM6m/Lat2Go3uKqJ58f6LQDB5cfcf3qqU\r\nQJCflCi1U0r2hULblIUE5ja/gXqcc53DuQMv/yusH8E/IzZgrWaes267Fzdj\r\nWUjE7ZKCUYjHwNNvrkfT5h0mvrj6RuVZuD9K5BpSRfIVqet+uJgfk/BStZzB\r\nzw/qiKHcpyPcQZUHq/RI7aoBjAragJ6J8g2AKQ8E80MeBpi5nPCtkPZ8e6rl\r\nXdvAehJI9zoHcaE/wE+pfaFe22wr0fJe8eM0aY0RuqOS05f6Nknc9rkcSo5v\r\nKB04Bwn2GYAMPge18X+EruvHrBgKT46BEyg=\r\n=k1gH\r\n-----END PGP SIGNATURE-----\r\n","size":2472,"noattachment":false,"key":"/@envelop/parser-cache/-/@envelop/parser-cache-5.0.7-alpha-20230505095813-2dc6c6f3.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.7-alpha-20230505095813-2dc6c6f3_1683280757508_0.045971634009506435"},"_hasShrinkwrap":false,"publish_time":1683280757662,"_cnpm_publish_time":1683280757662,"dist-tags":{"alpha":"11.0.2-alpha-20261126100851-58d9782f151a975e802f1a545a315263d8d886a7","latest":"11.0.1","rc":"11.0.2-rc-20261124205929-9595907fc2bef8a397343bd288fef4685ab9f508"}}