Skip to content

feat(COMPT-55): add ICacheStore port and Redis/InMemory adapters#1

Merged
y-aithnini merged 1 commit intodevelopfrom
feature/COMPT-55-icachestore-interface-adapters
Mar 31, 2026
Merged

feat(COMPT-55): add ICacheStore port and Redis/InMemory adapters#1
y-aithnini merged 1 commit intodevelopfrom
feature/COMPT-55-icachestore-interface-adapters

Conversation

@y-aithnini
Copy link
Copy Markdown

Summary

  • What does this PR change?

Why

  • Why is this change needed?

Checklist

  • Added/updated tests (if behavior changed)
  • npm run lint passes
  • npm run typecheck passes
  • npm test passes
  • npm run build passes
  • Added a changeset (npx changeset) if this affects consumers

Notes

  • Anything reviewers should pay attention to?

@y-aithnini y-aithnini requested a review from a team as a code owner March 31, 2026 09:10
Copilot AI review requested due to automatic review settings March 31, 2026 09:10
@y-aithnini y-aithnini merged commit 7179644 into develop Mar 31, 2026
1 of 2 checks passed
@sonarqubecloud
Copy link
Copy Markdown

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 ICacheStore port as the common async cache contract.
  • Adds RedisCacheStore (ioredis-backed) and InMemoryCacheStore adapters and exports them from src/index.ts.
  • Adds @ports/* and @adapters/* path aliases (tsconfig + Jest) and adds ioredis dependency.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants