-
-
Notifications
You must be signed in to change notification settings - Fork 292
Description
Here is the translated user story in English, with @tsed/platform-cache
and cache-manager@6
references:
🚧 Migrate Ts.ED from node-cache-manager@5
to cache-manager@6
🎯 Goal
Update the caching integration in our Ts.ED application to use the latest stable version of cache-manager
(v6), replacing the outdated node-cache-manager@5
currently used via @tsed/platform-cache
.
✅ Context
The @tsed/platform-cache
module currently relies on node-cache-manager@5
. Version 6, released under the renamed cache-manager
package, introduces several breaking changes:
- Fully asynchronous Promise-based API (no more callbacks).
- Removal of
store.create()
, replaced by direct constructors. - Changes in store modules (
memory
,redis
, etc.). wrap()
is still supported, but may require adjustments.
✍️ User Story
As a backend developer,
I want to migrate the caching system using @tsed/platform-cache
to cache-manager@6
,
so that we can stay up-to-date, avoid deprecated APIs, and ensure long-term maintainability.
🔧 Technical Tasks
-
Remove
node-cache-manager@5
and related type definitions. -
Install
cache-manager@6
and update typings if needed. -
Adapt usage of
@tsed/platform-cache
to the new API:- Update
get
,set
,del
,wrap
, etc. - Review options passed to
PlatformCacheModule
.
- Update
-
Update or replace any custom stores (
cache-manager-redis-store
, etc.) to be compatible with v6. -
Refactor any services manually using
PlatformCache
. -
Add non-regression tests to validate cache behavior.
-
Document any changes in configuration or behavior.
🧪 Acceptance Criteria
- The application starts without cache-related errors.
- All uses of
@Cache
,@UseCache
, orPlatformCache
work as expected. - All existing cache-related tests pass without regressions.
- External stores (
redis
,memory
, etc.) work properly withcache-manager@6
. - A changelog or pull request comment explains the key changes made.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status