Skip to content

Commit 14ad0b1

Browse files
Merge pull request #1942 from ncausey/patch-1
docs(caching): update docs for disabling cache expiration
2 parents 7e9dffa + 7fbb571 commit 14ad0b1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

content/techniques/caching.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,10 @@ You can manually specify a TTL (expiration time in seconds) for this specific ke
5858
await this.cacheManager.set('key', 'value', { ttl: 1000 });
5959
```
6060

61-
To disable expiration of the cache, set the `ttl` configuration property to `null`:
61+
To disable expiration of the cache, set the `ttl` configuration property to `0`:
6262

6363
```typescript
64-
await this.cacheManager.set('key', 'value', { ttl: null });
64+
await this.cacheManager.set('key', 'value', { ttl: 0 });
6565
```
6666

6767
To remove an item from the cache, use the `del` method:

0 commit comments

Comments
 (0)