next-runtime icon indicating copy to clipboard operation
next-runtime copied to clipboard

Support for on-Demand Revalidation

Open kamerat opened this issue 2 years ago • 34 comments

I'm having issues using the on-demand revalidation when hosted on netlify. When I test it locally by doing next build and next start it works. However, when I test it on a build-deploy or live, it does not seem to update the page.

I have validated that the API endpoint in netlify gets run, has the correct data and unstable_revalidate did not break. (in ___netlify-handler function log)

Does on-demand revalidation not work on netlify yet, or am I missing some config?

EDIT:

Also discussed in https://github.com/netlify/netlify-plugin-nextjs/discussions/1228

Originally posted by iankduffy February 18, 2022 Hello, NextJS 12.1 has added On-demand Incremental Static Regeneration currently in Beta / Unstable, just wondering if in the future if we are looking to add this to netlify plugin?

kamerat avatar Mar 31 '22 14:03 kamerat

Hi @kamerat Currently on-demand revalidation is not supported. It is on our roadmap, but we cannot share a date for support yet.

ascorbic avatar Apr 01 '22 10:04 ascorbic

@ascorbic is unstable_revalidate unsupported still? I just tried it and it seems to not work, at least.

EddyVinck avatar Jun 22 '22 16:06 EddyVinck

@ascorbic Still to this date with [email protected] res.revalidate(), it doesn' t update the page although the revalidate api endpoint handle the request.

yescine avatar Jul 24 '22 21:07 yescine

@yescine @EddyVinck in progress!

ascorbic avatar Jul 25 '22 08:07 ascorbic

Hi, any updates on progress for this?

iurage avatar Sep 02 '22 04:09 iurage

@iurage we are keen to support this as soon as possible and are working toward it as per our roadmap

orinokai avatar Sep 05 '22 09:09 orinokai

Would be good to hear an update on this. It's been a much talked about feature in my team and we're really looking forward to selling this performance benefit to our clients!

ChazUK avatar Nov 11 '22 14:11 ChazUK

Really would like to see this for feature parity with other hosting providers. Any updates on timeline? This is bordering on dealbreaker for us as we have a massive blog that we can't realistically rebuild every time someone finds a typo.

pm0u avatar Nov 11 '22 16:11 pm0u

I'm afraid I can't be any more specific than "this is being worked on". We're waiting on some new platform features that we need for this to work, but I think you'll be pleased with the results.

ascorbic avatar Nov 14 '22 10:11 ascorbic

"this is being worked on"... i mean, seems like a trivial task given that you already support {revalidate: 60}. If you're concerned about resource use, then just paywall it. It wouldn't be so bad if we also didn't have to wait 60 seconds for revalidation... maybe bring that down to 10 seconds?

elleryfamilia avatar Jan 07 '23 02:01 elleryfamilia

i mean, seems like a trivial task given that you already support

You know that they there say are the two hard problems in computer science?

ascorbic avatar Jan 08 '23 11:01 ascorbic

@ascorbic Any updates?

theooog avatar Feb 20 '23 08:02 theooog

It's actively been looked at at the moment, but I can't provide a timeline yet @theooog.

nickytonline avatar Feb 20 '23 19:02 nickytonline

?

BilegtGG avatar Mar 15 '23 00:03 BilegtGG

Hey, any update on that?

Raphael2001 avatar May 14 '23 18:05 Raphael2001

@Raphael2001 not too long now 😄

orinokai avatar May 15 '23 08:05 orinokai

Hey guys, I'm sure you're sick of people asking, but my team is really excited about this feature.

Are there any updates to this? Or maybe a timeframe? Hopefully I'm not adding too much pressure 😄

ui-jb avatar Jun 05 '23 18:06 ui-jb

Probably easier to switch to Vercel at this point.

cbaucom avatar Jun 05 '23 18:06 cbaucom

Probably easier to switch to Vercel at this point.

Guaranteed that right after we switch to Vercel, Netlify will fix this. But growing extremely impatient at the lack of updates on this. Terrible having to manage a NextJS implementation without on demand revalidation.

osseonews avatar Jun 08 '23 15:06 osseonews

@orinokai @ascorbic Our team would also love NextJS On-Demand Revalidation supported on Netlify. Looking forward to seeing this released! Do you have a public roadmap where we can follow along with the progress on this feature?

justynspooner avatar Jun 20 '23 09:06 justynspooner

@justynspooner i'm afraid we don't currently maintain a public roadmap, but please be assured it's a priority and we're working hard to get this shipped

orinokai avatar Jun 21 '23 07:06 orinokai

+1 - It would be great to get ongoing updates on this feature, it has major impacts to us in project usages / api limits and bandwidths

tomswork avatar Jul 05 '23 04:07 tomswork

What are the current pending tasks that need to be completed for this to go live?

Because this is an open-source plugin, we'd like to contribute to it via a public checklist.

charkour avatar Jul 18 '23 18:07 charkour

Wondering if there are any updates for this?

caomicc avatar Sep 20 '23 18:09 caomicc

It has been more than a year, can we at least get an update and or ETA?

dev-fredericfox avatar Sep 28 '23 14:09 dev-fredericfox

@dev-fredericfox, although it's undocumented, this feature is enabled for Next.js sites on Netlify based on my experience.

Does it work for you?

charkour avatar Sep 28 '23 14:09 charkour

@charkour Dosen't seem to work for me. Did you get it to work on 13 with the app router? It works fine locally (Next.js 13 App router), and the webhook returns "ok" when on netlify, but the pages do not refresh.

dev-fredericfox avatar Sep 28 '23 14:09 dev-fredericfox

Screenshot 2023-09-28 at 16 35 59 Revalidate does not work for me either (using Next 13 with App Router). My current workaround is to redo deploy with the option "Clear cache and retry with latest branch commit".

azuxx avatar Sep 28 '23 14:09 azuxx

@dev-fredericfox, what is your revalidate: <ttl>? For example, my TTL is set to 60 seconds, so even when I run revalidate, my browser will cache the webpage until the TTL is up. Locally, Next.js will immediately update the page (when using next start) but with Netlify, it will start the TTL count the moment the page is loaded (not based on when it was built on the server).

charkour avatar Sep 28 '23 15:09 charkour

Revalidate on Next.js 13.3 with the Pages Router works on Netlify. You could email Netlify Support asking if there is anything that needs to be "enabled" on your account, but I don't think that's the case.

charkour avatar Sep 28 '23 15:09 charkour