On-demand revalidation in NextJs 14

preview_player
Показать описание
In this video, we'll look at on-demand revalidation in NextJs 14 using `revalidateTag` and `revalidatePath` functions.

👉🏼 The Ultimate NextJs 14 Course

👉🏼 Project source code (Github)

👉🏼 Work with me

Chapters
0:00 Intro
1:30 Cache revalidation
4:10 revalidatePath
6:45 revalidateTag
7:55 unstable_cache
9:00 Project code
15:30 Recap
Рекомендации по теме
Комментарии
Автор

Actually it looks like you are the Bob Ross of programming videos.

Every thing seems to be so easy and sometimes I fall asleep while listening in my bed 😂😂😂

LehmannMr
Автор

Great video. I learnt a couple of things

tonyeneh
Автор

Whenever i recieve your channel's notification, I click on it and i always learned something new. Thanks Bahram.🙏

kazmi
Автор

It was handy, and also easy to understand. Thanks for sharing 👍

mohsenlotfi
Автор

Exactly what I was looking for - directly in my feed.

RanNahmany
Автор

Great video.

Could you make a video with Clerk where signup in credentials, and add a role to the user by default? :) Or maybe choose like two different roles when signup, like consult, and busniess? :)

wmw
Автор

i hate these types of youtubers taht just read the documentation, wow so useful

adnn
Автор

A great clear video. Looking forward to the next one as I'm struggling with next caching when using rsc and revalidation - trying to work out which cache is sticking - is it the data cache or the router cache. Getting very inconsistent behaviour. Probably something I'm missing!

exposuredesignhelp
Автор

looking forward to caching video .. please keep as in-depth as possible .. cover server side caching as well ..

KamranSA
Автор

I noticed that on demand revalidation is currently used based on an event. When just doing simple fetches etc, do you recommend setting up time based revalidation?

RobertTerrell-li
Автор

Awesome. Can you make an example using the suspense component to simulate a skeleton loading and revalidate the cache? I have a bug, it seems that suspense does not work when i revalidate a tag or path, it only work on initial loading!

eualexslim
Автор

I have a question. I am using Django Rest Framework on backend and Next.js on frontend. When i hit the login api then after successful login, I receive accessToken and refresh token in json like this {"access": "xyz", "refresh": "xyz"}. I need to send the access token on every request to the backend server in Authorization header (headers: {Authorization: "Bearer token"}) . Where should I store the token in local storage or cookies. I am confused when I store in cookies I cannot send the request fom client components and when i store in local storage i cannot send the token with server components.

ayush_code
Автор

Hi! If i use this for example, im a manager and i have users that only me can read, if i put a tag on this like "user", any user that went to the same page gonna see my users cuz i fetched first? So the tags should be like "my-id-123-users"?

Nomoflatland
Автор

so revalidatePath will revalidate all data tags that are somehow referenced by the page on that path/route? Does it work if we have deeply nested calls to fetch or conditional fetching, as in, there are layers between the page and data layer calling fetch?

Aleks-fpkq
Автор

Not able to revalidate the root path in the app build with pages router

Ramsundarrp
Автор

Does the cache still cache a fetch with the same params but with a different header, let's say if the bearer token has change but I want to still keep the last data no matter the header changed in the fetch, the tags would help with that?

andrescardenas
Автор

How would u revalidate a dynamic path? for example i could have "/project/123", i want to revalidate that exact path. would the work?

Deliverant
Автор

At my workside we still use the "Pages" directory, and does this only apply to NEXTJS 14 or "App" directory

erasmusmensah
Автор

Here you used a revalidate button to get updates from the CMS, what if we wanna revalidate on CMS updates but without the button?

Smooth
Автор

Hey Hamed sorry for off-topic question man, but is it a good idea to learn React & node/express at the same time ? I know I wanna go full stack but some say I should first learn react to a decent level then begin learning backend, not sure what's the right call.

lostinthenarrativve