We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 931f4a7 + 7d37346 commit 0864142Copy full SHA for 0864142
content/techniques/caching.md
@@ -54,13 +54,13 @@ The default expiration time of the cache is 5 seconds.
54
You can manually specify a TTL (expiration time in seconds) for this specific key, as follows:
55
56
```typescript
57
-await this.cacheManager.set('key', 'value', { ttl: 1000 });
+await this.cacheManager.set('key', 'value', 1000);
58
```
59
60
To disable expiration of the cache, set the `ttl` configuration property to `0`:
61
62
63
-await this.cacheManager.set('key', 'value', { ttl: 0 });
+await this.cacheManager.set('key', 'value', 0);
64
65
66
To remove an item from the cache, use the `del` method:
0 commit comments