next.js
a5104a3c - Lazily call `refreshTags` and `getExpiration`

Commit
1 year ago
Lazily call `refreshTags` and `getExpiration` When `"use cache"` is not used on the current route, we don't need to call `refreshTags` for the configured cache handlers. So instead of calling it at the beginning of the request for every cache handler, we now call it lazily right before the first cache entry is retrieved for the respective cache handler (once per request). Similarly, we now call `getExpiration` for the implicit tags of the current route lazily (also once per request) after an existing cache entry has been retrieved, and its timestamp needs to be compared with the expiration of the implicit tags.
Author
Committer
Parents
Loading