Put use cache on the component, not the route
With Cache Components on, caching is a property of a subtree, not a page. A cached post body can sit next to a live view counter in the same response, and the build fails if a cached component reads a cookie it should not.
async function Post({ slug }) {
"use cache";
cacheTag(`post:${slug}`);
return <Article post={await getPost(slug)} />;
}The decision moves to the place that knows what the data depends on, which is the component.
nextjscaching
Longer version: the post this came from.