fix: avoid caching non-positive TTL entries
This commit is contained in:
@@ -48,7 +48,7 @@ interface Cache {
|
||||
}
|
||||
```
|
||||
|
||||
The cache key is the full request URL. `ttlMs` is in milliseconds and comes from `cacheTtlMs` or per-request `revalidateSeconds`.
|
||||
The cache key is the full request URL. `ttlMs` is in milliseconds and comes from `cacheTtlMs` or per-request `revalidateSeconds`. A non-positive `ttlMs` means "do not cache"; built-in caches delete/skip the entry rather than storing it forever.
|
||||
|
||||
## Redis-style cache example
|
||||
|
||||
|
||||
Reference in New Issue
Block a user