next.js
bda89d1d - Only log `pending revalidates...` debug log if applicable (#88221)

Commit
6 days ago
Only log `pending revalidates...` debug log if applicable (#88221) When [verbose cache logging](https://nextjs.org/docs/app/guides/incremental-static-regeneration#verifying-correct-production-behavior) is enabled, we were always adding a debug log as follows after rendering a page (during prerendering or at request time): ``` pending revalidates promise finished for: { auth: null, host: null, hostname: null, pathname: '/', port: null, protocol: null, query: undefined, search: '', hash: '', href: '/', slashes: null } ``` However, if there were no pending revalidates to process, this log is misleading as it suggests that there were pending revalidates that have now been processed, while in reality there were none. So with this PR, we now only log this message if there are actually any pending revalidates, i.e. some tags were revalidated, a `fetch` cache entry was revalidated, an `unstable_cache` entry was revalidated, or a `'use cache'` entry was saved to a cache handler. In addition, the log is now shortened to only log the URL string instead of the full URL object for better readability, e.g.: ``` pending revalidates promise finished for: / ```
Author
Parents
Loading