ng-universal icon indicating copy to clipboard operation
ng-universal copied to clipboard

Please make cache methods asynchronous

Open EndyKaufman opened this issue 2 years ago • 0 comments

I'm submitting a...


[ ] Regression 
[ ] Bug report
[x] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.

Current behavior

export interface CacheStorage {
  set(key: string, value: string, expiresIn: number): any;
  get(key: string): string | null;
}

Expected behavior

export interface CacheStorage {
  set(key: string, value: string, expiresIn: number): Promise<any> | any;
  get(key: string): Promise<string | null> | string | null;
}

Minimal reproduction of the problem with instructions

What is the motivation / use case for changing the behavior?

I want to store cache in database

Environment


Nest version: X.Y.Z

 
For Tooling issues:
- Node version: XX  
- Platform:  

Others:

EndyKaufman avatar Aug 19 '22 14:08 EndyKaufman