{"_id":"@cognitiveproof/cawg-trqp-plugin-redis","name":"@cognitiveproof/cawg-trqp-plugin-redis","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@cognitiveproof/cawg-trqp-plugin-redis","version":"0.1.0","description":"Redis-backed DecisionCache and RevocationDeltaStore for cawg-trqp-refimpl","license":"MIT","type":"module","main":"dist/index.js","types":"dist/index.d.ts","publishConfig":{"access":"public"},"scripts":{"build":"tsc -p tsconfig.json","typecheck":"tsc -p tsconfig.typecheck.json","test":"vitest run"},"dependencies":{"@cognitiveproof/cawg-trqp-plugin-types":"^0.1.0","ioredis":"^5.4.1"},"devDependencies":{"typescript":"^5.7.2","vitest":"^4.1.10"},"gitHead":"8826f04d0b5ed79855bbc2b34f138cbaf3a6d2ae","_id":"@cognitiveproof/cawg-trqp-plugin-redis@0.1.0","_nodeVersion":"25.9.0","_npmVersion":"11.12.1","dist":{"integrity":"sha512-raH9ftVuzgDaOQNL3wEkR/cdzQ4W1wRZw71J2OvESGPlnKL1tdd/6L6aXt5U+vrsBLHVDTBVXlu58EQq2avWtQ==","shasum":"5e2d25b45c725e138900a7c644e8f893df0fdc64","tarball":"https://registry.npmjs.org/@cognitiveproof/cawg-trqp-plugin-redis/-/cawg-trqp-plugin-redis-0.1.0.tgz","fileCount":10,"unpackedSize":8134,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDxhDW/wDYKCXm9n5ZDIVkrwc8HOzuBWgG92xoeLKPOSgIhAOZkDCbERSVY6zRu4KQW0I5WYnDFsrGmLothSf+POSL1"}]},"_npmUser":{"name":"mrappard","email":"mrappard@gmail.com"},"directories":{},"maintainers":[{"name":"mrappard","email":"mrappard@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/cawg-trqp-plugin-redis_0.1.0_1787689410909_0.5649307208108032"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-25T20:23:30.674Z","0.1.0":"2026-08-25T20:23:31.032Z","modified":"2026-08-25T20:23:31.524Z"},"maintainers":[{"name":"mrappard","email":"mrappard@gmail.com"}],"description":"Redis-backed DecisionCache and RevocationDeltaStore for cawg-trqp-refimpl","license":"MIT","readme":"# @cognitiveproof/cawg-trqp-plugin-redis\n\nRedis-backed `DecisionCache` and `RevocationDeltaStore` for [`cawg-trqp-refimpl`](../../README.md), using [`ioredis`](https://github.com/redis/ioredis).\n\nUse this when running more than one instance of the verifier/HTTP service: the core package's default in-memory `TTLCache` and `InMemoryRevocationDeltaStore` only affect the single process they're constructed in, so cache hits and pushed revocation deltas don't propagate across instances. Backing both by Redis makes them shared across every instance.\n\n## Install\n\n```bash\nnpm install @cognitiveproof/cawg-trqp-plugin-redis\n```\n\n## Usage\n\n```ts\nimport { Verifier, MockTRQPService } from \"cawg-trqp-refimpl\";\nimport { RedisDecisionCache, RedisRevocationDeltaStore } from \"@cognitiveproof/cawg-trqp-plugin-redis\";\n\nconst verifier = new Verifier({\n  service: new MockTRQPService(\"data/policies.json\", \"data/revocations.json\"),\n  cache: new RedisDecisionCache({ url: process.env.REDIS_URL }),\n  revocationDeltaStore: new RedisRevocationDeltaStore({ url: process.env.REDIS_URL }),\n});\n```\n\nOr with `HTTPTRQPService`:\n\n```ts\nimport { HTTPTRQPService, MockTRQPService } from \"cawg-trqp-refimpl\";\nimport { RedisDecisionCache } from \"@cognitiveproof/cawg-trqp-plugin-redis\";\n\nconst service = new HTTPTRQPService(new MockTRQPService(\"data/policies.json\", \"data/revocations.json\"), {\n  cache: new RedisDecisionCache(),\n});\n```\n\n## Configuration\n\nBoth classes accept an options object, or fall back to the `REDIS_URL` environment variable, or `redis://localhost:6379`:\n\n```ts\nnew RedisDecisionCache({ url: \"redis://my-redis:6379\", keyPrefix: \"myapp:cache:\" });\nnew RedisRevocationDeltaStore({ url: \"redis://my-redis:6379\", key: \"myapp:revocation-delta\" });\n```\n\nBoth share a single `ioredis` connection per process (see `src/client.ts`).\n","readmeFilename":"README.md","_rev":"1-3125f85e1d384397faaaf73db5270e4f"}