You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/techniques/caching.md
+7Lines changed: 7 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,13 @@ First install [required packages](https://github.com/node-cache-manager/node-cac
10
10
$ npm install cache-manager
11
11
```
12
12
13
+
> info **Hint** As of version `>=9.2.1`, NestJS is compatible with both `cache-manager` v4 and v5.
14
+
15
+
> warning **Warning**`cache-manager` version 4 uses seconds for `TTL (Time-To-Live)`. The current version of `cache-manager` (v5) has switched to using milliseconds instead. NestJS doesn't convert the value, and simply forwards the ttl you provide to the library. In other words:
16
+
> * If using `cache-manager` v4, provide ttl in seconds
17
+
> * If using `cache-manager` v5, provide ttl in milliseconds
18
+
> * Documentation is referring to seconds, since NestJS was released targeting version 4 of cache-manager.
19
+
13
20
#### In-memory cache
14
21
15
22
Nest provides a unified API for various cache storage providers. The built-in one is an in-memory data store. However, you can easily switch to a more comprehensive solution, like Redis.
0 commit comments