The Four Levels of Caching in Next.js
Vložit
- čas přidán 28. 07. 2024
- 🚀FREE 2024 Next.js Visual CheatSheet: bit.ly/nextjs-visual-cheatsheet
⭐️ Join the Waitlist for the Exclusive Next.js Workshop: bit.ly/nextjs-workshop2024
#nextjs #react #javascript #typescript #caching
⏰ Timeline
00:00 - 00:29 Intro
00:30 - 1:02 4 Different Levels of Caching
1:03 - 2:31 - Request Memoization
2:32 - 5:10 - Data Cache in Next.js
5:11 - 11:56 - Different Data Fetching
Mechanisms in Data Cache
11:57 - 16:26 - Purge Cache and Revalidate
Data in Server Actions
16:27 - 19:45 - Router Cache in
Next.js
19:46 - 24:22 - Full Route Cache
in Next.js
24:23 - Let’s revisit the Caching
Diagram in Next.js
🔗 RESOURCES:
💌 Frontend Newsletter:
Frontend Snacks 🍿 bit.ly/fesnacks
If you liked this video, you will also love my newsletter Frontend Snacks. You will learn a new topic each week with cool visuals and snippets, the latest frontend news and behind-the-scenes exclusive updates that I don't share anywhere else.
✨ FREE Goodies: kulkarniankita.com/goodies
☎️ Book a 1:1 coaching session with me
Opened a few coaching calls, grab them before they are gone: bit.ly/30mins-coaching-with-a...
🐤 Find me here
Twitter: / kulkarniankita9
LinkedIn: / kulkarniankita
So what are some burning questions you have about caching? Or Next in general? Comment below and let me know!
Can we do this without fetch? I'm using axios.
You're the only one who cover any of the topic from NextJs deeply 🔥
You're 🫵🏼 channel is like a video repentattion document 👀 of NextJs 👏🏼🎉
Thank you ankita madam ❤
Haha thanks! Appreciate it
Thank you, this has been very helpful
Thank you very much Ankita, this is very helpful
Glad you found it helpful!
Really Great Content
Thanks a lot for sharing this
Thanks!
Keep growing
Thank you!
Neatly explained
Thanks !
Thanks, glad you like it!
I learned a couple of new things from this video, Thank you so much for making such content🙏🙏
Of course, thank you! 😊
Thanks to make it simple to understand 😊
Thanks! 😊
Thanks a lot ♥
Of course!
Cool stuff ❤
Thanks! 😊
Good job!
Thanks!
Great explanation. Thanks.
Glad it was helpful!
Nice explanation❤
Thanks!
Thanks Mam you explained it very nicely.
Glad to hear that! Thanks
When you do a fetching or a prism within a server actions, is it cached?
Hi Ankita do on the loading with template tsx when refresh the page loader to apply and also on page navigation also I am eagerly waiting for this to implement in my project.I like ur way of explanation and I am now ur subscriber
Thanks!
Great video yesterday only I started learning Next.js but as sr developer I have one big question how does Next.js works under the hood what exactly it’s doing if you can make full in depth video in that would be helpful
Thanks!
Hey Ankita, Can you make a video on how to properly and securely make api calls in either React or NextJs which is to be used for production.
Hey check the data fetching section in the Nextjs crash course on my channel. I show how you can do that!
@@Kulkarniankita Thanks for the reply, My bad I haven't seen the video yet, and kept the tab open to watch it later, But this came to my mind and posted the comment. I have some other doubts as well in frontend development for suggestion, where can I post Ankita?
Hey ankita, i am very much confused with using the USE SERVE and USE CLIENT and mixing and matching RSC with server actions, etc.
Could you please make a video to cover all that ?
That’s a good point, yeah I’ll consider it!
*Thanks* alot for this simplified and detailed explanation.
Respected Ma'am,
What happens when there are 2 users, hiting the API 1st user gets new data, but what happens if 2nd user comes after revalidation period ??
First user gets stale data but kicks off a request to get fresh data so that the 2nd user gets fresh data!
@@Kulkarniankita Thankyou Ma'am for answering this, but NextJS didn't behave like this. I had an external API which my NextJS route handler calls to get data, but despite external API returning 503, 429, etc. after revalidation period NextJS returns old cached data. I have more details about this question on StackOverflow, search for question *NextJS 14 returns old cached data even if external API returns error on revalidate* to get more details.
Any tips for speeding up next.js image loading? Tried various optimizations like sharp, resizing, and quality adjustments but still facing slow loading times despite small image sizes (37kb). Any suggestions?
Hmm Did you try caching on the CDN?
which soft you use for recording?
Hey I’m using Premiere pro!
Here in nextjs we can use only Link tag there is no use of anchor tag in nextjs is it correct
You can use anchor tag as Link uses anchor tag under the hood but you won’t get a bunch of capabilities like prefetching etc. if you don’t.
@@Kulkarniankita understood I need a clarity on initially I run nom run dev a white space appearing and displaying the UI so how to handle and pls explain about loaders spin every page routing
👋