Open
Description
Link to the code that reproduces this issue
https://codesandbox.io/p/devbox/q3xjfg
To Reproduce
My steps are in with dynamicIO enabled but it also doesn't work without it.
- Set up a fetch function that uses a tag for caching:
export const getData = async () => {
'use cache';
cacheTag('example-tag');
cacheLife('seconds');
return fetch('https://example.com/api/data', {
method: 'GET',
});
};
- Create an action or route handler that revalidates the tag:
'use server';
import { revalidateTag } from 'next/cache';
export async function revalidateExampleTag() {
revalidateTag('example-tag');
}
- Call the revalidation action from another component:
// app/page.tsx or app/components/Trigger.tsx
'use client';
import { revalidateExampleTag } from '../actions';
export default function Page() {
return (
<button onClick={() => revalidateExampleTag()}>
Revalidate
</button>
);
}
Current vs. Expected behavior
Current
When calling revalidateTag()
in a Next.js app (App Router), any fetch()
requests that are internally triggered as part of the revalidation are not logged in the terminal
Expected
fetch()
requests triggered by revalidateTag()
should be logged in the terminal like any other server-side fetch call
Provide environment information
"next": "15.4.0-canary.75",
Which area(s) are affected? (Select all that apply)
dynamicIO
Which stage(s) are affected? (Select all that apply)
next dev (local)