Skip to content

feat: allow cache-key factory to be async#1006

Open
swieton wants to merge 2 commits intonestjs:masterfrom
swieton:master
Open

feat: allow cache-key factory to be async#1006
swieton wants to merge 2 commits intonestjs:masterfrom
swieton:master

Conversation

@swieton
Copy link

@swieton swieton commented Feb 6, 2026

Builds on @ivanfmn's work and allows the cache key factory to be an async function.

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other... Please describe:

What is the current behavior?

Issue Number: N/A

What is the new behavior?

  • Updates the CacheKeyFactory type to allow returning either a key or a promise.
  • Updates the CacheInterceptor to await the cache key factory when necessary.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@swieton
Copy link
Author

swieton commented Feb 13, 2026

@kamilmysliwiec were there any other changes you wanted me to make on this?

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.

3 participants