Feature/compt 56 cache module service#2
Merged
y-aithnini merged 6 commits intodevelopfrom Apr 1, 2026
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Introduces a new CacheKit caching module for NestJS, providing a CacheService backed by pluggable store adapters (Redis or in-memory) and wiring via a dynamic CacheModule.
Changes:
- Added
CacheModule(sync + async registration) with DI tokens and aCacheServiceAPI (get/set/delete/clear/has/wrap). - Introduced the
ICacheStoreport plus Redis and in-memory adapter implementations. - Updated TS/Jest path aliases and added
ioredisdependency.
Reviewed changes
Copilot reviewed 9 out of 11 changed files in this pull request and generated 17 comments.
Show a summary per file
| File | Description |
|---|---|
| tsconfig.json | Adds @ports/* and @adapters/* path aliases. |
| jest.config.ts | Adds Jest moduleNameMapper entries for new aliases. |
| src/cache-kit.module.ts | Implements the dynamic Nest module and async registration patterns. |
| src/services/cache.service.ts | Adds the primary caching service API used by consumers. |
| src/ports/cache-store.port.ts | Defines the adapter contract (ICacheStore). |
| src/adapters/redis-cache-store.adapter.ts | Adds ioredis-backed cache store adapter. |
| src/adapters/in-memory-cache-store.adapter.ts | Adds Map-backed cache store adapter with TTL. |
| src/constants.ts | Defines DI tokens for store + module options. |
| src/index.ts | Updates public API exports to expose the new cache module/service/tokens/types. |
| package.json | Adds ioredis dependency. |
| package-lock.json | Locks dependency graph changes for ioredis and transitive deps. |
…ache-module-service
|
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