{"name":"@envelop/validation-cache","version":"5.1.4-alpha-20230505095410-8ff5ea11","sideEffects":false,"peerDependencies":{"@envelop/core":"3.0.7-alpha-20230505095410-8ff5ea11","graphql":"^14.0.0 || ^15.0.0 || ^16.0.0"},"dependencies":{"hash-it":"^6.0.0","lru-cache":"^6.0.0","tslib":"^2.5.0"},"repository":{"type":"git","url":"git+https://github.com/n1ru4l/envelop.git","directory":"packages/plugins/validation-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/validation-cache`\n\nThis plugins adds simple LRU caching to your `validate`, to improve performance by caching the\nvalidation result.\n\nThis plugins improves performance of validating by ~50% (based on benchmarks).\n\n## Getting Started\n\n```\nyarn add @envelop/validation-cache\n```\n\n## Usage Example\n\n```ts\nimport { execute, parse, specifiedRules, subscribe, validate } from 'graphql'\nimport { envelop, useEngine } from '@envelop/core'\nimport { useValidationCache } from '@envelop/validation-cache'\n\nconst getEnveloped = envelop({\n  plugins: [\n    useEngine({ parse, validate, specifiedRules, execute, subscribe }),\n    // ... other plugins ...\n    useValidationCache({\n      // options goes here\n    })\n  ]\n})\n```\n\n### API Reference\n\n#### `cache`\n\nSet this to pass in a cache instance. By default a new LRU cache is created using default `max` and\n`ttl`.\n","readmeFilename":"README.md","description":"This plugins adds simple LRU caching to your `validate`, to improve performance by caching the validation result.","bugs":{"url":"https://github.com/n1ru4l/envelop/issues"},"homepage":"https://github.com/n1ru4l/envelop#readme","_id":"@envelop/validation-cache@5.1.4-alpha-20230505095410-8ff5ea11","_integrity":"sha512-e12+cBLr26AW/4dlmLjfH5QFT/ekrO33gURKfr/twpsPCw8+Qv6iJ/3mh9benOltwbuCiZrqc+bpRFMslpnLUw==","_resolved":"/tmp/ffe1c4fcf8ee33ff9bed788dd8a0d6b1/envelop-validation-cache-5.1.4-alpha-20230505095410-8ff5ea11.tgz","_from":"file:envelop-validation-cache-5.1.4-alpha-20230505095410-8ff5ea11.tgz","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-e12+cBLr26AW/4dlmLjfH5QFT/ekrO33gURKfr/twpsPCw8+Qv6iJ/3mh9benOltwbuCiZrqc+bpRFMslpnLUw==","shasum":"7ed82b4533e7da8014bb94b1e90d9587a053ae69","tarball":"http://registry-npm.ywwl.com/@envelop/validation-cache/download/@envelop/validation-cache-5.1.4-alpha-20230505095410-8ff5ea11.tgz","fileCount":8,"unpackedSize":8676,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCqFbZvtYktOotzwE6qER4jQtLGwe+1IbAgxXtTUGsYNwIgUS5dTznBZ9Zf4PJjwu2Abk3YKKDDtAHwoAeJJR+hGu0="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkVNKOACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqDPw/+LwAw1dbvmJG1Jsoj3bBVndlYxfe4v7s/82hggTgeYeSwMTgV\r\n+zo7Wo3uB0VwnDLhryr8yXQjEJqOJEilJ1HuCy4H5ai4q5T+2CNMhgAoEvHr\r\nAzEBKDKz9Om/DlBfzrZoFBxogBUYKPgNSewhITsbryYVLQrpmTMniLzFoQmZ\r\nucUZbBmku5cTGRvU8gHVhZi+FGqo12sBCqZCuxzd3NTed+iI8JPSQfQ3JHRy\r\nkvSeDYVNYEyg13QWFLZEg6h/Fxws98jOpuXspbM6ZQayelY5bu+N9zHTk94H\r\nBg9vXzqmwdXkudUy3pB3OIYun4FHsmvvD4oVnyHXrpgBkmv5ulTuJDXfUnGW\r\njigguPpdifzy72A1JWAUTlUAZmFAuliRZ+KwgtTiTQO5Nb/6afNCEionWruj\r\nJk8stW2mFUgqEOLmHklmqYOkjaC1TvCec5vVh2fHtSoA/7ZNdJs0o9pjxPox\r\ngP2+jbLznFG2GOrgxDaNCm2gV9rDEE4DZ1G+otvHqMWyeNjMDZlhvBKtvrQD\r\nCdWZpQ6hQn4UTTYeIEGX1evUFdWTyvYZjWQFxsnU9r3Nv/TLtsVc4DAibFT3\r\nLjGZydwSTfTVvIcWHaRDnzq/zfFi1crBypzYgfepSIM/jfXwBvWekPOsqhn6\r\n64eKM7yKdQeruYeRUr4M7tKx9w044sVoHmo=\r\n=jwYZ\r\n-----END PGP SIGNATURE-----\r\n","size":2849,"noattachment":false,"key":"/@envelop/validation-cache/-/@envelop/validation-cache-5.1.4-alpha-20230505095410-8ff5ea11.tgz"},"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/validation-cache_5.1.4-alpha-20230505095410-8ff5ea11_1683280525764_0.39247786362638326"},"_hasShrinkwrap":false,"publish_time":1683280525968,"_cnpm_publish_time":1683280525968,"dist-tags":{"alpha":"11.0.2-alpha-20261126100851-58d9782f151a975e802f1a545a315263d8d886a7","latest":"11.0.1","rc":"11.0.2-rc-20261124205929-9595907fc2bef8a397343bd288fef4685ab9f508"}}