feat(COMPT-55): add ICacheStore port and Redis/InMemory adapters#1
Merged
y-aithnini merged 1 commit intodevelopfrom Mar 31, 2026
Merged
Conversation
|
There was a problem hiding this comment.
Pull request overview
Adds a cache-store abstraction (ICacheStore) to CacheKit and provides two concrete implementations (Redis-backed and in-memory), wiring in new path aliases and exporting the new API from the package entrypoint.
Changes:
- Introduces
ICacheStoreport as the common async cache contract. - Adds
RedisCacheStore(ioredis-backed) andInMemoryCacheStoreadapters and exports them fromsrc/index.ts. - Adds
@ports/*and@adapters/*path aliases (tsconfig + Jest) and addsioredisdependency.
Reviewed changes
Copilot reviewed 6 out of 8 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| tsconfig.json | Adds TS path aliases for @ports/* and @adapters/*. |
| jest.config.ts | Adds matching Jest moduleNameMapper entries for the new aliases. |
| src/ports/cache-store.port.ts | Defines the ICacheStore interface contract. |
| src/adapters/redis-cache-store.adapter.ts | Implements ICacheStore on top of ioredis, including prefixing and clear(). |
| src/adapters/in-memory-cache-store.adapter.ts | Implements ICacheStore using a Map with lazy TTL eviction. |
| src/index.ts | Exposes ICacheStore + both adapters as the package’s public API. |
| package.json | Adds ioredis to dependencies. |
| package-lock.json | Locks ioredis and transitive dependencies. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
Why
Checklist
npm run lintpassesnpm run typecheckpassesnpm testpassesnpm run buildpassesnpx changeset) if this affects consumersNotes