Speed Up Your Apps with Cache Control

  Рет қаралды 20,158

Huntabyte

Huntabyte

Күн бұрын

Пікірлер: 63
@Huntabyte
@Huntabyte Жыл бұрын
I'm aware that there is a lot more to caching than what I cover in this video, so if you have any tips, I'd love to hear them!
@Palundrium
@Palundrium Жыл бұрын
Related, but if anybody is looking for a simple caching solution without the overhead or dependency on redis, the `lru-cache` NPM package is a solid bet. 😄 Important note: it uses whatever memory is serving your Node app (within set limits) to cache most recently used values (i.e. it typically evicts "Least Recently Used" values at a set limit). And it was created by the creator of NPM.
@Huntabyte
@Huntabyte Жыл бұрын
@@Palundrium for sure a great option if you aren’t deploying the app to vercel or similar serverless platform!
@Shaparder
@Shaparder Жыл бұрын
I know your numbers arent that big, but I swear never stop making these, you're incredible at explaining concept, and the live demonstration is always on point ! Ill never stop supporting this channel, keep going man
@Huntabyte
@Huntabyte Жыл бұрын
Thank you! I don’t do it for the numbers, nor do I see myself stopping anytime soon 💯
@Loui3Hunna
@Loui3Hunna Жыл бұрын
Thank you so much for taking the extra time to make illustrations for the concepts in your videos. It makes learning and implementing them feel so much more natural
@Huntabyte
@Huntabyte Жыл бұрын
You're very welcome!
@magicalmonke
@magicalmonke Жыл бұрын
finally a sveltekit redis tutorial! great video
@Huntabyte
@Huntabyte Жыл бұрын
Thank you!
@blur3d
@blur3d Жыл бұрын
Really solid educator and high level screencast quality. You really help make topics easy to digest and actionable with practical examples with code. Thanks!
@Huntabyte
@Huntabyte Жыл бұрын
Thank you! That means a lot!
@skullyonutube
@skullyonutube Жыл бұрын
Mate, this is excellent 👍. I am rebuilding an old Jekyll site into a sveltekit site. The site can hit 1million page loads in a day, fetching data from a headless CMS. Even though they say requests that hit the cached API are not counted it might be worth it to have redis in front of the graphql API. So as a first time sveltekit project for me, your videos have been super useful!
@Huntabyte
@Huntabyte Жыл бұрын
Thank you, David! I'm glad to hear that!
@Allformyequine
@Allformyequine Жыл бұрын
Well done again! I REALLY appreciate the time you took to make the Excalidraw blackboard drawings; I think that is the best explanation for caching I've ever seen, and the drawings really help; to be able to show that visually is just wonderful! Thank you!! I learned something 😎😎!
@Huntabyte
@Huntabyte Жыл бұрын
That's amazing to hear! You're very welcome!
@ygdiget4119
@ygdiget4119 Жыл бұрын
I've been wanting a video like this for months! Thank you so much Hunter!!
@Huntabyte
@Huntabyte Жыл бұрын
You’re welcome!!
@itswadesh
@itswadesh Жыл бұрын
Thank you so much for this, we really need more. Cache is the most tricky to handle. Even I don't understand why Sveltekit throws error when I use 2 cacheControl header in 2 separate pages.
@manuelalejandrosaezpalomin3904
@manuelalejandrosaezpalomin3904 Жыл бұрын
Awesome work! Thanks for explaining these concept so clear. 🙌
@budivoogt491
@budivoogt491 6 ай бұрын
Great explanation. Wasn't familiar with Redis' benefits before but this elucidated them well.
@imho7992
@imho7992 Жыл бұрын
Another great vid Hunter, great stuff!
@Huntabyte
@Huntabyte Жыл бұрын
Thank you!
@RonaldNababan
@RonaldNababan Жыл бұрын
I have been looking for this, thank you
@Huntabyte
@Huntabyte Жыл бұрын
You’re welcome!
@paivagabriel
@paivagabriel Жыл бұрын
Thanks for another great content, Hunter! Looking forward to your course covering all the technologies you use (Svelte/SvelteKit, Typescript/ZOD, Supabase, TailwindCSS, Redis, Stripe, etc) to build a full stack app. Is it coming any time soon? 😅
@Huntabyte
@Huntabyte Жыл бұрын
Thank you! Yes, soon enough!
@paivagabriel
@paivagabriel Жыл бұрын
@@Huntabyte 🙌🏼🙌🏼. Waiting for it!
@rabbitMuncher1
@rabbitMuncher1 Жыл бұрын
Good video. Very well explained 😁
@Huntabyte
@Huntabyte Жыл бұрын
Thank you, Simon!
@ecasilla01
@ecasilla01 Жыл бұрын
A Part 2 of this great video can be a 3rd iteration where you can show cache stampede protection 😅
@abekaj
@abekaj Жыл бұрын
Love your videos, thanks for making them! I'm working on a SvelteKit app where multiple routes have their own +page.server.ts with API fetching. Could you possibly explain how to cache across these routes so the API result is stored as the users moves between routes? Perhaps using stores and with/without cache-control?
@Huntabyte
@Huntabyte Жыл бұрын
You can use a layout load function for that!
@albinsjolin649
@albinsjolin649 Жыл бұрын
Dude you are a god
@Huntabyte
@Huntabyte Жыл бұрын
Thank you!
@ManoharMaharshi
@ManoharMaharshi Жыл бұрын
Tq, but it would be great if you could make a full stack project-based video series covering these latest and greatest tools.
@RRits57
@RRits57 Жыл бұрын
Quality content, keep it up
@Huntabyte
@Huntabyte Жыл бұрын
Thank you, will do!
@Saad-ou3ss
@Saad-ou3ss Жыл бұрын
Great video.
@Huntabyte
@Huntabyte Жыл бұрын
Thank you, Saad!
@CrimeBeanus
@CrimeBeanus Жыл бұрын
tyvm
@Huntabyte
@Huntabyte Жыл бұрын
You're very welcome!
@rafael_tg
@rafael_tg Жыл бұрын
Thanks for the excellent videos. What about Vercel ISR? Do you have a tutorial about it ?
@Huntabyte
@Huntabyte Жыл бұрын
No but this seems like a good idea to make one!
@JahirAlam
@JahirAlam Жыл бұрын
Great video Do we need redis if we use cloudflare pages ?
@Huntabyte
@Huntabyte Жыл бұрын
I need to look into Cloudflare a bit more before I can provide an accurate answer, I know their technology is amazing, I just haven't had the time to learn!
@scott_itall8638
@scott_itall8638 Жыл бұрын
just using the setHeaders, nothing from my load appears in the network, setting max=age has zero affect it always fetches.
@tiagostit6
@tiagostit6 Жыл бұрын
How I would make SvelteKit revalidate the data in a set amount of time?
@ChrisJaydenBeats
@ChrisJaydenBeats Жыл бұрын
Take a look at Upstash. They make serverless Redis stupid simple 👏
@casper5314
@casper5314 Жыл бұрын
Hi, I have a problem with 'vite dev' It will not load the page anymore after 5 seconds. it will load forever and nothing happens
@LyroPac
@LyroPac Жыл бұрын
Hello man, great video. At 14:17 we can see the or the server logged an error. I do often get that kind of error message where the parameters is replaced by something different, do you know how to fixed it?
@raihanhossain3423
@raihanhossain3423 Жыл бұрын
For Scenario 3 : Will it be more faster!? (in your code ) when data get from the server first- async function will send data to the client, after that second - it will set/send data to redis
@Huntabyte
@Huntabyte Жыл бұрын
For the next user that requests that same dataset, yes!
@raihanhossain3423
@raihanhossain3423 Жыл бұрын
@@Huntabyte no I said you sending redis first then client. what if you send client in a separate async function and then redis.
@Huntabyte
@Huntabyte Жыл бұрын
@@raihanhossain3423 Oh, yes, you could even do a promise.all() or something of that sort! Good catch!
@nayandeepyadav8790
@nayandeepyadav8790 4 ай бұрын
why not write data to servers disk, that would be faster than api call to redis to get the data
@victordvickie
@victordvickie Жыл бұрын
make a video on how to make sveltekit webapp to a mobile app using capacitorjs or webview etc..
@raph151515
@raph151515 Жыл бұрын
isn't it more straight forward to write : redis.set(q, await res.text(),"EX",600); why parsing + stringifying when you can just take the string. I hope the browser is keeping the text() value after json() have been called which means calling text() is cheap
@Huntabyte
@Huntabyte Жыл бұрын
Good point! I actually haven't tried that, but if you do and it works as expected, let me know!
@tarsisiushp
@tarsisiushp Жыл бұрын
sveltekit and firebase pleasee
@meaningmean
@meaningmean Жыл бұрын
Love the diagrams
@Huntabyte
@Huntabyte Жыл бұрын
Glad you do!
@thedelanyo
@thedelanyo Ай бұрын
I was expecting the redis.set to have an object argument with {ttl} 😅😅
SvelteKit Authentication with Lucia & Prisma
23:46
Huntabyte
Рет қаралды 51 М.
Practical Svelte 5 - Shopping Cart
25:10
Huntabyte
Рет қаралды 19 М.
小丑揭穿坏人的阴谋 #小丑 #天使 #shorts
00:35
好人小丑
Рет қаралды 52 МЛН
1, 2, 3, 4, 5, 6, 7, 8, 9 🙈⚽️
00:46
Celine Dept
Рет қаралды 96 МЛН
Motorbike Smashes Into Porsche! 😱
00:15
Caters Clips
Рет қаралды 23 МЛН
Human vs Jet Engine
00:19
MrBeast
Рет қаралды 206 МЛН
Forms Will Never Be the Same
10:10
Huntabyte
Рет қаралды 58 М.
SvelteKit API Routes & Endpoints
18:59
Huntabyte
Рет қаралды 35 М.
Monitor Docker Containers Like a Pro with Grafana & Prometheus
11:10
Ehsan's Tech Cave
Рет қаралды 566
Svelte makes Drag And Drop API easy!
15:08
Antonio Sarcevic
Рет қаралды 22 М.
Protect SvelteKit Routes with Hooks
21:10
Huntabyte
Рет қаралды 59 М.
Svelte UI Libraries Have Leveled Up
12:14
Huntabyte
Рет қаралды 62 М.
Svelte 5's Secret Weapon: Classes + Context
18:14
Huntabyte
Рет қаралды 26 М.
Build a Reactive Search Filter with Svelte
16:11
Huntabyte
Рет қаралды 26 М.
Understand How Data Flows Through SvelteKit
25:59
Joy of Code
Рет қаралды 19 М.
Why Your Load Functions are Slow
8:24
Huntabyte
Рет қаралды 21 М.
小丑揭穿坏人的阴谋 #小丑 #天使 #shorts
00:35
好人小丑
Рет қаралды 52 МЛН