Last active
April 2, 2022 04:47
-
-
Save sunnyy02/e1538e8f6c10cf120f9374e469d5bc27 to your computer and use it in GitHub Desktop.
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
| const value = await this.cacheManager.get('test-key'); | |
| if (!value) { | |
| const response = await this.getHello(); | |
| this.cacheManager.set( | |
| 'test-key', | |
| response, | |
| { ttl: 0 }, | |
| ); | |
| return response; | |
| } | |
| return value; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment