{"name":"@envelop/parser-cache","version":"5.0.3-alpha-20221027093244-bdb059d7","sideEffects":false,"peerDependencies":{"@envelop/core":"3.0.3-alpha-20221027093244-bdb059d7","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":"bdb059d7be193fb2630d7556e5f1a2b0085c1011","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.3-alpha-20221027093244-bdb059d7","_nodeVersion":"18.12.0","_npmVersion":"8.19.2","dist":{"integrity":"sha512-a/O27YA0JrmtFHd4vsj0Mq5CS7valhjKTFvawZwaT8vcg94pUUiKTg0wvrKn6qujTCxLrkVmE89uv5IK55JYhg==","shasum":"9c8075be2fb0268600bd69be725ca6f863bf46af","tarball":"http://registry-npm.ywwl.com/@envelop/parser-cache/download/@envelop/parser-cache-5.0.3-alpha-20221027093244-bdb059d7.tgz","fileCount":7,"unpackedSize":6301,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE9aQiujKhHSulsD25QWdLfR7hywOIOP/LybA2fFFJhlAiAViDJvlfGQaWZTAaQxhTPfNeOjfXDTjWLIJC6p3VRJNg=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjWlBvACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoZMRAAiVrL+0UcAdX+7ymNjIqBrkAHgZ34REhWyQjvMxdsb/PqRZJh\r\nMosxmBG94vGXYxBQugGA806tkj0u+OF9ICp3kvexsefj7wo3Kkhfu6yxJtjE\r\nwmacOI0nJJ+lnaFs2jh9qZL2jsH2wfDg+vEj5QWJXTC+Eql67N/AbKJ+5oxY\r\nhdkiw+ko8TkNxScCA7rEEC2dHIv5+EDPsAFtteIaVbJ//XdArzZsM/VZR2GT\r\nFJ9Ly47bcM4KxhZ+O4GnlYD4jcnw/cdrmaOlsTM7AQodEZ2pmrJd8xs03IoF\r\nA4diR2uZ7mteyGd8vKRXPK1Agj7nFXauqWm4tJT0Wy0O1ln/+Jap+Oby2xY5\r\nixITcDumbxz0HP4FGErx4JFoMRpNcphOEW9We4WgDg9tFaahCGnDVlEj+weL\r\nr5CIfb5lW6IX2f6Hr3tEWvvVSm0mwbNlLDmsULkAmdlPefxeLaZZbZ945jag\r\nD2EIp/urc+BDSHggnUGpVHDpRY75wIVCmQDJzph1ubM558TU8XWC1RggfmJm\r\nd9wqcB+WJqc1t12eZYNiiJMwkikEm6XrOl8fQ/UMd5qT6WT9RbM8stftLNVi\r\nNonnCXs2sqNkh9JsGiI4GEmH6UyZF9JHMCLnj5Np7OtbsbmMPr1nTtXhbVVA\r\nHg8USoVlFTQZC0KzHeUt/Y/9CIsVWhT9Lv4=\r\n=pZxl\r\n-----END PGP SIGNATURE-----\r\n","size":1778,"noattachment":false,"key":"/@envelop/parser-cache/-/@envelop/parser-cache-5.0.3-alpha-20221027093244-bdb059d7.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.3-alpha-20221027093244-bdb059d7_1666863215697_0.52443502278796"},"_hasShrinkwrap":false,"publish_time":1666863215854,"_cnpm_publish_time":1666863215854,"dist-tags":{"alpha":"11.0.2-alpha-20261126100851-58d9782f151a975e802f1a545a315263d8d886a7","latest":"11.0.1","rc":"11.0.2-rc-20261124205929-9595907fc2bef8a397343bd288fef4685ab9f508"}}