Both timestamps below are frozen while served from cache. Enable NEXT_PRIVATE_DEBUG_CACHE=1 in your env to see cache hits in the server logs.
The page is statically generated and cached in Redis. After 30s the next request triggers a background regeneration (stale-while-revalidate).
An independent cache entry stored in Redis under the key cache-test-data. It has its own TTL and can be invalidated via its tag without touching the page cache.
Both buttons call a server action then redirect back — the first request after revalidation still serves stale content while regeneration runs in the background. Reload once more to see fresh values.