app/private-cache/product/[id]/with-private/page.tsx
1async function getRecommendations(productId: string) {
3 cacheTag(`recommendations-${productId}`);
4 cacheLife({ stale: 60 });
6 // Can call cookies() INSIDE the cached function!
7 const sessionId = (await cookies()).get('session-id')?.value || 'guest';
9 return getPersonalizedRecommendations(productId, sessionId);