Problem with dynamic page cache #86508
Replies: 8 comments 14 replies
-
Code example? Is this working locally (with a build+start), but not on Vercel? or other serverless deploy? |
Beta Was this translation helpful? Give feedback.
-
|
I don't have special code you code test it by your self ❤️😅
…On Wed, Nov 26, 2025, 15:15 Joseph ***@***.***> wrote:
Well, I need to some some code to be able to help ya! Could you share some
pseudocode at least?
—
Reply to this email directly, view it on GitHub
<#86508 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A72UNVT2JGKOTY2GZ5D4ENT36WHFPAVCNFSM6AAAAACNFSX3C6VHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTKMBYGU3TEMI>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
|
Thank you ❤️🙏
…On Wed, Nov 26, 2025, 18:45 Joseph ***@***.***> wrote:
I picked some else's project and it kind of works ok, each card is a
/cards/[slug]/page.tsx kind of page - sorry if I am being like this, I am
very short on time, so if we can discuss over the same code we'll make a
lot of gains, instead of trying to guess past each other.
https://github.com/user-attachments/assets/5406864f-6ddc-4ad7-b0ec-4d3e31e05302
—
Reply to this email directly, view it on GitHub
<#86508 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A72UNVUKWAIX7SBSRMNVUKT36W7X3AVCNFSM6AAAAACNFSX3C6VHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTKMBYG43TMNQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
|
You right
…On Wed, Nov 26, 2025, 18:45 Joseph ***@***.***> wrote:
I picked some else's project and it kind of works ok, each card is a
/cards/[slug]/page.tsx kind of page - sorry if I am being like this, I am
very short on time, so if we can discuss over the same code we'll make a
lot of gains, instead of trying to guess past each other.
https://github.com/user-attachments/assets/5406864f-6ddc-4ad7-b0ec-4d3e31e05302
—
Reply to this email directly, view it on GitHub
<#86508 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A72UNVUKWAIX7SBSRMNVUKT36W7X3AVCNFSM6AAAAACNFSX3C6VHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTKMBYG43TMNQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
|
I'll send you a sample code tomorrow night. Sorry for being late, I have an
exam tomorrow morning. Sorry again.
…On Wed, Nov 26, 2025, 18:45 Joseph ***@***.***> wrote:
I picked some else's project and it kind of works ok, each card is a
/cards/[slug]/page.tsx kind of page - sorry if I am being like this, I am
very short on time, so if we can discuss over the same code we'll make a
lot of gains, instead of trying to guess past each other.
https://github.com/user-attachments/assets/5406864f-6ddc-4ad7-b0ec-4d3e31e05302
—
Reply to this email directly, view it on GitHub
<#86508 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A72UNVUKWAIX7SBSRMNVUKT36W7X3AVCNFSM6AAAAACNFSX3C6VHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTKMBYG43TMNQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
|
For this code, first we need to go to the /auth page, then register, then
create a few tasks on the home page, then when you go to the page that
displays the tasks, you should click on each task and it should immediately
display that page for the second time onwards, but this is not the case. I
have given some guidance in the READ.md file on how to run my code.
…On Thu, Nov 27, 2025, 12:57 Joseph ***@***.***> wrote:
Nice. So like, what is your expectation, let's avoid assumptions, so that
we can make progress here.
What I see in that repo is that, src/app/(main)/todos/[id]/page.tsx and
src/app/(main)/todos/page.tsx do a look up for data associated with a
user, either for all todos or one todo by [id].
What expectation are you having, or what's not working at all? Is it ISR
per todo? or are you seeing too many hits against the database, in spite of
the caching? did you expect more in the static shell?
—
Reply to this email directly, view it on GitHub
<#86508 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A72UNVU5DPOXEZYIXTJ25R33627ZPAVCNFSM6AAAAACNFSX3C6VHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTKMBZGQ4TSMY>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
|
It doesn't work properly for me. When I use 3G, even though I'm on the todo
page, it still takes a while to display.
…On Thu, Nov 27, 2025, 14:26 Joseph ***@***.***> wrote:
What you mean more is like, well the TODO is stored in in-memory cache,
for max time, doesn't the page just show it, and that's one of the
ongoing pieces here, you can already add something like, to your
todos/[id] page, and you'll see that
export const unstable_prefetch = {
mode: "runtime",
samples: [{}],};
With this added, you'll see that the RSC payloads change. In this case the
todo is console.log
Without:
1:"$Sreact.fragment"
2:"$Sreact.suspense"
4:I[97367,["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/3f1a423581781f16.js"],"OutletBoundary"]
0:{"buildId":"WXjjMYAbz7pXvgU0J7G5G","rsc":["$","$1","c",{"children":[["$","div",null,{"className":"w-full flex flex-col items-center gap-5 p-20","children":[["$","p",null,{"className":"font-semibold text-3xl","children":"the todo ***@***.***"}]}]]}],"loading":null,"isPartial":true}
5:null
No console.log text to be seen, only the loading state (no fallback UI on
your suspense boundary).
Normally, the network is so fast, you might not even see this but if you
slow it down yeah...
With the runtime prefetch:
1:"$Sreact.fragment"
3:I[97367,["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/3f1a423581781f16.js"],"OutletBoundary"]
4:"$Sreact.suspense"
6:I[97367,["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/3f1a423581781f16.js"],"ViewportBoundary"]
8:I[97367,["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/3f1a423581781f16.js"],"MetadataBoundary"]
b:I[27201,["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/3f1a423581781f16.js"],"IconMark"]
***@***.******@***.******@***.***"}]}]}]]}],false]],"S":false}
2:["$","div",null,{"className":"w-full flex flex-col items-center gap-5 p-20","children":[["$","p",null,{"className":"font-semibold text-3xl","children":"the todo page"}],["$","$4",null,{"children":"$La"}]]}]
7:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]
a:["$","div",null,{"className":"w-full h-screen flex flex-col items-center justify-center gap-5","children":[["$","p",null,{"className":"text-xl","children":"console.log"}],["$","p",null,{"className":"text-xl","children":"11/27/2025"}]]}]
9:[["$","link","0",{"rel":"icon","href":"/favicon.ico?favicon.0b3bf435.ico","sizes":"256x256","type":"image/x-icon"}],["$","$Lb","1",{}]]
5:null
Now we see it. As part of the 7th entry. So clicking into the item shows
immediate data.
This and any other automatic optimizations will be part of the final
picture. The team wants to ensure that if the automatic optimizations don't
pick up on a certain page, then the dev runtime or build step should tell
you that, as in one route navigation might not work as you expect... It is
still unstable in terms of the API, but this is part of feature set that
Cache Components covers.
—
Reply to this email directly, view it on GitHub
<#86508 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A72UNVQSWQLW6YP2ZF4UIVD363KFJAVCNFSM6AAAAACNFSX3C6VHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTKMBZGU4TENY>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
|
Thanks |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello everyone,
I’m working with Next.js 16 and I’ve enabled the new Component-level Cache feature. It works correctly for static pages, but I’ve run into an issue: dynamic routes/pages do not seem to be cached at all, even though caching is enabled.
Is this the expected behavior for dynamic pages in Next.js 16, or am I missing something in the configuration?
Any clarification on why component caching doesn’t apply to dynamic routes would be greatly appreciated.
Thank you in advance.
Beta Was this translation helpful? Give feedback.
All reactions