Closed kahlstrm closed 2 weeks ago
Allow CI Workflow Run
Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer
@styfle Hi, I hate to be that guy who randomly pings maintainers, but could you look at this to check if this is a wanted feature? For instance, our site becomes slow and unresponsive after a stale cache.
We have minimumCacheTTL configured for an hour, but many people might not know about it, and IMO, this would benefit people in general.
Commit: c1d8c4e71ff93ee9dd40104b5f414bf1a0a9338b
TURBOPACK=1 pnpm test-start test/e2e/app-dir/app-static/app-static-custom-handler.test.ts
(turbopack)
traceparent
header was differentcache
should supercede dynamic config when force-dynamic is usedRead more about building and testing Next.js in contributing.md.
Commit: c1d8c4e71ff93ee9dd40104b5f414bf1a0a9338b
What?
getHash
-function to returnbase64url
instead of custom variant of standardbase64
. This can be removed if deemed not necessary.getImageEtag
-function to do it) to happen insideimage-optimizer
for better consistency.Why?
Currently when an image is requested and it becomes stale, the server will trigger a full image optimization for that image, using a significant spike in CPU-usage for routes that have multiple images (e.g. an image carousel).
How?
By calculating and storing the upstream etag in the cache entry, we can utilize the previously cached entry to check if the upstream image has remained the same, making it possible to reuse the previously cached entry again, as the image optimization would produce the same results anyways.