Redis Caching in Node.js

  Рет қаралды 226,894

Traversy Media

Traversy Media

4 жыл бұрын

In this video I will show you how to setup caching with Node.js & Redis and look at how it is beneficial.
Code:
gist.github.com/bradtraversy/...
Sponsor: DevMountain Bootcamp
goo.gl/6q0dEa
Windows Download:
github.com/dmajkic/redis/down...
Redis Crash Course:
• Redis Crash Course Tut...
💖 Become a Patron: Show support & get perks!
/ traversymedia
Udemy Courses:
www.traversymedia.com
Follow Traversy Media:
/ traversymedia
/ traversymedia
/ traversymedia

Пікірлер: 241
@morenokv
@morenokv 4 жыл бұрын
My fiance left me about a month ago during the hardest time of my life. I let myself be sad for a day then decided I want to work on my purpose which is to become a front-end developer. So far I bought your HTML and CSS course which is phenomenal. Once done going to buy your JavaScript then react course. Thank you so much, you courses have helped through this dark time and I know there is a light at the end of the tunnel!
@TraversyMedia
@TraversyMedia 4 жыл бұрын
morenokv sorry to hear that friend. Im glad i could help give you something to get your mind off it 😉
@Frazer227
@Frazer227 4 жыл бұрын
Im so sorry man, but these things can happen. I hope you get through all right. Just remember, there are still people out there that love you. By the way, (At the moment) there are plenty of fish in the sea (not if we keep global warming up though) and you'll find the perfect match one day! I hope you make it through!
@GameMasters825
@GameMasters825 4 жыл бұрын
Bro theres a lot of people out there dont stay dow, i bougth all courses of Brad, i told you worth it, but after all courses you need make your own projects, wich you will really learn code, dont miss your faith
@suyasrivastv
@suyasrivastv 4 жыл бұрын
there are lot of people who dont have a fiance so cheer up
@zuzukouzina-original
@zuzukouzina-original 4 жыл бұрын
I think you should be thankful to her. She saved you from wasting you with miserable time. You’re unchained now come on dude. There are plenty women out there, but don’t look for Kardashians kind of women, but hard working women who knows the value of life.
@UnknownEntity606
@UnknownEntity606 6 ай бұрын
All these years later, this video still stands as a simple introduction to redis. It's instructive and straight to the point. Thanks for the quality content.
@rgonzy2124
@rgonzy2124 5 ай бұрын
thanks, I'm hesitant to watch it and saw that the date is 4yrs ago. but I saw this reply and watch it anyway.
@markmansur9268
@markmansur9268 4 жыл бұрын
I was literally wondering how to do EXACTLY this a few days ago for my mobile app backend. Thanks again Brad!
@srcmake
@srcmake 4 жыл бұрын
Amazing video as usual, Brad. Your example server was concise and showed exactly what was needed to demo redis. And honestly, I didn't think to use middleware to check for the cached result and end the response early. That's a 200 IQ play. (I probably would have put the cache check in the same endpoint right before making the fetch call, which is clearly suboptimal.) Thanks for the video! I really learned quite a bit, and I've interviewed with some big companies that do use Redis so it is an important skill.
@Mar2431
@Mar2431 4 жыл бұрын
Thanks again Brad for this quick course on Redis Caching. I've just recently finished your Udemy course React Front To Back 2019 it was perfect! You provide great learning resources and tutorials to this community of web developers. Thank you!!!
@maagu-_-
@maagu-_- 3 жыл бұрын
I cannot thank you enough for these courses/lessons. You are a phenomenal teacher, Brad! These KZfaq lessons led me to your Udemy courses which I'm happily buying. Keep it up 😀
@pavlovicjosip
@pavlovicjosip 4 жыл бұрын
Yesterday i was like thinking "hmm how should i implement cache in node.js?" and of course when i get home from the work, you uploaded this video. Thank you Brad, you are the best ! :)
@vaibhavnadgonde4397
@vaibhavnadgonde4397 4 жыл бұрын
Always pleasure watching your videos. thx again brad
@charliebewsey6872
@charliebewsey6872 4 жыл бұрын
Just bought your udemy course after watching a couple of your free videos - I've been really impressed with you as a teacher, I hope that the money you get from doing this stuff justifies the time you must spend doing this! It's a real pleasure to support you, I'm sure I'll be buying your javascript course next!
@kanaanbahmani5062
@kanaanbahmani5062 4 жыл бұрын
Thank you Brad you always upload things that people need the most, with the best timing. Thank you my man, you're a great man.
@yitzchaksviridyuk932
@yitzchaksviridyuk932 3 жыл бұрын
Went through 3 of your Redis videos today. Crash course, user management app, and just finished this video. Gotta say it's helped a lot. I keep saying this, but thanks again for the video!
@johnnycakez2750
@johnnycakez2750 4 жыл бұрын
Currently working through the express section of your react front to back course, this is a neat little bonus. I don't know how you do it but your timing is always perfect!
@codesmart9044
@codesmart9044 4 жыл бұрын
perfect timing with perfect to the point clear cut explanation ... if you are not in youtube maybe i never doing software development. thanks man... great help from you as always.
@freddyhaug9379
@freddyhaug9379 3 жыл бұрын
This is such a well done video, you can watch in in 2x speed and complete understand everything. Someone can watch this and become a fullstack developer in 7 minutes
@TraversyMedia
@TraversyMedia 4 жыл бұрын
Line 6 should be process.env.REDIS_PORT .........Brain fart 😊
@Ambass001
@Ambass001 4 жыл бұрын
You are amazing Brad 💪
@Luxcium
@Luxcium 4 жыл бұрын
and what about line 15 hardcoding the 5000🤨 but line 16 using ${PORT}🧐 ... ??? 🤣😜 too much brain farts lead to code smell 🤭🙊💩
@royhonders
@royhonders 4 жыл бұрын
You should pin this
@dilsmatchanov
@dilsmatchanov 4 жыл бұрын
also why the fuck did you declare the port variable if you listen on 5000 port anyway?
@arpee1337
@arpee1337 4 жыл бұрын
@@dilsmatchanov Nothing works better than dropping a "fuck" inside a question to create empathy and show you're a great person 👍🏼
@saranshmamtakhetarpaul6798
@saranshmamtakhetarpaul6798 4 жыл бұрын
Thank you so much for giving a much clearer picture of Redis :)
@Melvin420x12
@Melvin420x12 3 жыл бұрын
I come from your videos out 2017 and wow the change in videoquality is insane! You've made huge progress
@haroldcrane1595
@haroldcrane1595 4 жыл бұрын
You read my mind!! Just started learning redis yesterday. thanks bro!
@alibarznji2000
@alibarznji2000 2 жыл бұрын
You're a big help, anytime I want to learn something new, you come to the rescue. Thanks
@Battery64121
@Battery64121 4 жыл бұрын
Excellent video. You have a good way of breaking technologies into simple practical parts that I can immediately see using in the real world. I thought getting started with Redis would be so much more complicated!
@sharad_1992
@sharad_1992 4 жыл бұрын
Thanks for the quick overview of redis. I like the network part in the video. It really defines the benefits of redis cache.
@CoryTheSimmons
@CoryTheSimmons 4 жыл бұрын
Really great tutorial. Short, simple, explained the concept well enough to get me really interested in learning more.
@tomosterlund6497
@tomosterlund6497 3 жыл бұрын
Thank you Sir! Always thought that caching was something really tricky, until now. Managed to push down waiting time on a few of my slowest requests with ~40-50%, in production, in the project I'm working on right now :)
@klarnorbert
@klarnorbert 3 жыл бұрын
It's tricky, if you write a library yourself. Js community is so big, there's a solution for everything.
@causecaos
@causecaos 4 жыл бұрын
Awesome stuff, I have always kept away from Redis but this is something else. Thanks, Brad
@indiansoftwareengineer4899
@indiansoftwareengineer4899 4 жыл бұрын
Thanks, I loved your channel. but I haven't finished with the video, but before that I gave like and then started.
@smsibasish
@smsibasish 4 жыл бұрын
Exactly what I was looking for. Thanks brad :)
@augustinekanyi
@augustinekanyi 4 жыл бұрын
aah Mr Brad! nice to watch your videos in the afternoon!
@HackerWulf
@HackerWulf 4 жыл бұрын
Love this tutorial. Easily explained! Thank you.
@dev-qq2vy
@dev-qq2vy 4 жыл бұрын
Redis becomes very easy to understand with your presentation. Thanks.
@sam_mitschiro
@sam_mitschiro 4 жыл бұрын
As someone who uses redis in production, both as a queue and cache, i can confirm that redis is powerful.
@colonizatorgg5960
@colonizatorgg5960 3 жыл бұрын
hey, can you give your github?
@yonatandawit8112
@yonatandawit8112 2 жыл бұрын
Comprehensive and neat tutorial 👏
@SuperJAIMISH
@SuperJAIMISH 3 жыл бұрын
Simple and concise! Great tutorial.
@locksfamily
@locksfamily 4 жыл бұрын
Timely as hell dude. Thanks!
@tingtingzhou9508
@tingtingzhou9508 4 жыл бұрын
Such a useful video! looking forward to more!
@codicts5149
@codicts5149 4 жыл бұрын
Hope you still there. I just want to say thank you! you've inspired me to create my own channel.
@sam-jm1vb
@sam-jm1vb 4 жыл бұрын
got my sub!
@TraversyMedia
@TraversyMedia 4 жыл бұрын
Awesome...keep at it
@TraversyMedia
@TraversyMedia 4 жыл бұрын
Love the beats. Real hip hop, not that trap stuff
@codicts5149
@codicts5149 4 жыл бұрын
@@TraversyMedia Thanks for replying. I definitely will!
@MrGreenpaulo
@MrGreenpaulo 4 жыл бұрын
@@TraversyMedia if you like those beats Brad you might like this - kzfaq.info/get/bejne/o9d0d9d8lqy1pmg.html
@hroland
@hroland 4 жыл бұрын
Was just watching your 2017 tutorial when I spotted you uploaded an updated one! :) Much appreciated!
@khalidelgazzar
@khalidelgazzar 11 ай бұрын
Superb tutorial. Short & sweet. Thank you!
@atmospheric_b
@atmospheric_b 4 жыл бұрын
Yes! Thats one exactly what i needed! Thanks Brad!
@zvuk
@zvuk 4 жыл бұрын
This is not a video that i need, but still ... i let it play, and give it a like and comment this just to support you. This channel deserves it. I do not do such things on any other channel.
@surajdutta5730
@surajdutta5730 3 жыл бұрын
Awesome tutorial. Just what I wanted to learn today 👏
@larissarosa5863
@larissarosa5863 4 жыл бұрын
As always, a greate video! Thank you very much! I was able to apply pretty much everything with Python. Awesome.
@jorkhachatryan317
@jorkhachatryan317 4 жыл бұрын
Hello Brad, you are my hero-instructor, because you always creating very useful content at right time(for me). Will be great to see Kubernetes course. Thank you very much you're the best!!!!
@AdarshMadrecha
@AdarshMadrecha 4 жыл бұрын
Thanks for such awesome videos. It helps a lot.
@AmitYadav-el5wg
@AmitYadav-el5wg 2 жыл бұрын
Awesome tutorial, i think one of the best tutorial on redis in node. Thank you 😊
@nandinaulfaldy9132
@nandinaulfaldy9132 2 жыл бұрын
Thanks your course and everything is always helping me, can't wait to buy your next course
@JKaromo
@JKaromo 4 жыл бұрын
Much love from Kenya.... Love your content.
@bwanamaina
@bwanamaina 4 жыл бұрын
👌🖒
@zuhrulanam5971
@zuhrulanam5971 2 жыл бұрын
Woahhh. Thanks for this gold tutorial, very clear and understand
@usmankhan-tm2iw
@usmankhan-tm2iw 3 жыл бұрын
Thanks. You made redis so easy.
@user-yr6be8nr4h
@user-yr6be8nr4h 4 жыл бұрын
Спасибо большое вам, очень помогли, все понятно и быстро!) Thank you :)
@nidhishetty1225
@nidhishetty1225 4 жыл бұрын
Thank you so much for sharing your knowledge:-)
@bodolawale5448
@bodolawale5448 4 жыл бұрын
Awesome video brad
@sasg87962
@sasg87962 4 жыл бұрын
Thank you, that was easy to understand .. thanks again
@aniketfadia7328
@aniketfadia7328 3 жыл бұрын
Thank you for this video! Keep going, mate! :)
@gabrielobafisile2299
@gabrielobafisile2299 2 жыл бұрын
Thanks Brad. You rock the dev
@viniciusse1
@viniciusse1 4 жыл бұрын
Dude, awesome video. Congrats.
@umamaheshmeka1032
@umamaheshmeka1032 4 жыл бұрын
Nice one brad, thanks for making it look so easy. by the way I had to do `redis-server` first and then `redis-cli` in my Mac Mojave.
@arunprabu7476
@arunprabu7476 2 жыл бұрын
Very neat & nice tutorial, This is what exactly i was looking for... :-)
@talalnajam8692
@talalnajam8692 4 жыл бұрын
I can't believe how you make programming look so simple and understandable. Excellent video as always :)
@ecommerceuk
@ecommerceuk 4 жыл бұрын
Excellent tutorial. Concise and totally aligns with the title. Strangely, 7 people have hit the thumb down. Is there another country where thumb down means good? No other obvious explanation.
@alvin_lal
@alvin_lal 3 жыл бұрын
This is the perfect example for a redis beginner
@rounaksengupta1920
@rounaksengupta1920 Жыл бұрын
Nice video to learn in depth
@pankaj_9998
@pankaj_9998 3 жыл бұрын
As always very useful. Thanks
@subratarudra2745
@subratarudra2745 5 ай бұрын
Nice explanation🔥
@PrashanthPuranik
@PrashanthPuranik 3 жыл бұрын
Thanks Brad for the great intro to using Redis with Node. I noticed small typo at 5:28 - it should have been something like process.env.REDIS_PORT || 6379 and not process.env.PORT || 6379. Wanted to document here as a comment for welfare of anyone setting up a PORT environment variable only and wondering why the script wouldn't run. EDIT ------- Also app.listen( PORT, ... ) would be required.
@user-lg7rz8je1h
@user-lg7rz8je1h 6 ай бұрын
Its very helpful. Thank you
@valentinopereira58
@valentinopereira58 4 жыл бұрын
super helpful.. thanks brad
@josedejesuslopezdiaz
@josedejesuslopezdiaz 4 жыл бұрын
tu eres uno de esos canales de programacion de los que veo publicidad a proposito por que me gusta tu contenido. talves no entiendes lo que te digo pero te lo queria decir.
@Qwerter1410
@Qwerter1410 4 жыл бұрын
Great video!
@alaindimabuyo
@alaindimabuyo 4 жыл бұрын
love this kind of new stuff
@josesanchezquintana7720
@josesanchezquintana7720 4 жыл бұрын
Thank you, I would try enhance my project in NOSQL with your videos
@ChhaihongSRUN
@ChhaihongSRUN 4 жыл бұрын
Hey Brad! Please, make more videos about Redis.
@andrejtacigin697
@andrejtacigin697 4 жыл бұрын
hey Brad, quite often the job applications look for AWS/S3 knowledge. I tried looking for your tutorials on it, but couldn't find anything. Hoping you can make one when you catch the time. thank you!
@pavlobohatchuk2809
@pavlobohatchuk2809 4 жыл бұрын
This so cool, thank you!
@argahutama
@argahutama Жыл бұрын
So useful, thanks
@lukehero
@lukehero 4 жыл бұрын
Would love to see something like multiple user sessions with this.
@buyandelgerbatsaikhan1202
@buyandelgerbatsaikhan1202 4 жыл бұрын
Good one! Thanks!
@MERNStack
@MERNStack 3 жыл бұрын
yes it seems so useful and fast up the site
@NicoAntoniw
@NicoAntoniw 4 жыл бұрын
Hey brad, could you make a video about a node.js headless cms ??
@TraversyMedia
@TraversyMedia 4 жыл бұрын
Yes definitely at some point
@ashiqsultanmohamed9765
@ashiqsultanmohamed9765 4 жыл бұрын
Please make one, a tutorial on Strapi will be great.
@yashtibrewal4259
@yashtibrewal4259 3 жыл бұрын
Informative, Thank you. Just one question, I like your speed to code while you are explaining, so how many years of coding experience do you have (non-industry and industry)?
@batsaikhanorgil9153
@batsaikhanorgil9153 4 жыл бұрын
Great,Thanks for diverse topic, Can make content about jest and ezyme
@MaheshKumar-lq1xm
@MaheshKumar-lq1xm 3 жыл бұрын
That was awesome
@sleeptil3
@sleeptil3 2 жыл бұрын
FYI if you're getting the node-fetch ES Module error its because newer node-fetch only supports import. You can either downgrade node-fetch to 2.6.1 to use require() or add "type": "module" to the package.json and use 'import' (for everything) instead of 'require'
@ShivaKumar-st9ps
@ShivaKumar-st9ps Жыл бұрын
You may not needed node-fetch anymore. In the latest version of Node.js (18.0.0), global fetch (experimental) is enabled by default.
@munapadhi8723
@munapadhi8723 4 жыл бұрын
thanks brad .
@vittoriodeluca5233
@vittoriodeluca5233 4 жыл бұрын
Awesome video Brad. What about making a NginX or varnish video?
@neenus
@neenus 4 жыл бұрын
Brad as always very informative easy to understand tutorial .... my one question to you and is definitely off topic... but I love how your browser new tab starts with this customized page and I've created something similar to it but couldn't figure out how to customize my chrome browser to start with it would you mind sharing how you did it! it seems like you're using Chrome browser if it is how did you customize the new tab to start like that I couldn't find anything in the settings that lets new tab start with a customized page?? thank you!!
@microvirus
@microvirus 3 жыл бұрын
Thank you so much
@Geomaverick124
@Geomaverick124 4 жыл бұрын
I think i may implement Redis in one of my portfolio projects once they are finished. Would you suggest Redis for CRUD apps or Fullstack apps or just for client websites...When do you think adding Redis can become over kill?
@ramprasath25
@ramprasath25 4 жыл бұрын
Kudos man Cheers..
@claytonvanderhaar3772
@claytonvanderhaar3772 3 жыл бұрын
Awesome thanks
@Ghaleon
@Ghaleon 3 жыл бұрын
Hi ! What font do you use? it's rounded and so nice to my eyes
@idopshik
@idopshik 4 жыл бұрын
Cool vid!
@novailoveyou
@novailoveyou 3 жыл бұрын
Thanks!!
@bicanmarianvaleriu5400
@bicanmarianvaleriu5400 4 жыл бұрын
Based on your experience for server caching a node app, do you recommend lru-cache or this method ?
@eugenevedensky6071
@eugenevedensky6071 4 жыл бұрын
Interesting! So this is coaching implemented on an api layer using redis. Now, is it viable to implement a similar strategy using local/session storage in the client if user data remains relatively unchanged throughout the day?
@ighsight
@ighsight 2 жыл бұрын
Excellent.
@Lucifer-wd7gh
@Lucifer-wd7gh 4 жыл бұрын
Brad please make a video on making javascript widgets. Example, we paste a script link on html and live chat software appears on our website .
@ashafloki
@ashafloki 2 жыл бұрын
Thanks a lot
@happinin
@happinin 2 жыл бұрын
could you please give us a video explaining how redis is used with socket.io and node.js to make websockets more efficient and scalable, and how this process is done? would really appreciate it. also what are the disadvantages to running socket.io naked without redis?
@cobrassasino
@cobrassasino 4 жыл бұрын
Thanks a lot Brad for this video. I tried many to watch videos and understand Redis. I still can't see the purpose of this! :( When Redis is useful?
@gauravpoudel7288
@gauravpoudel7288 3 жыл бұрын
awesome thanks
Redis Crash Course
27:31
Web Dev Simplified
Рет қаралды 603 М.
How does Caching on the Backend work? (System Design Fundamentals)
22:45
Software Developer Diaries
Рет қаралды 31 М.
THEY made a RAINBOW M&M 🤩😳 LeoNata family #shorts
00:49
LeoNata Family
Рет қаралды 28 МЛН
Always be more smart #shorts
00:32
Jin and Hattie
Рет қаралды 46 МЛН
Неприятная Встреча На Мосту - Полярная звезда #shorts
00:59
Полярная звезда - Kuzey Yıldızı
Рет қаралды 7 МЛН
МАМА И STANDOFF 2 😳 !FAKE GUN! #shorts
00:34
INNA SERG
Рет қаралды 4,5 МЛН
HTMX Crash Course | Dynamic Pages Without Writing Any JavaScript
56:47
Traversy Media
Рет қаралды 138 М.
I've been using Redis wrong this whole time...
20:53
Dreams of Code
Рет қаралды 334 М.
Node.js API Authentication With JWT
23:01
Traversy Media
Рет қаралды 555 М.
Node.js is a serious thing now… (2023)
8:18
Code With Ryan
Рет қаралды 631 М.
Async JS Crash Course - Callbacks, Promises, Async Await
24:31
Traversy Media
Рет қаралды 1,4 МЛН
Redis Crash Course
1:23:37
Piyush Garg
Рет қаралды 106 М.
React Crash Course 2024
3:04:36
Traversy Media
Рет қаралды 339 М.
The Importance of Specialization in Coding
7:13
Traversy Media
Рет қаралды 190 М.
ИГРОВОВЫЙ НОУТ ASUS ЗА 57 тысяч
25:33
Ремонтяш
Рет қаралды 337 М.
PART 52 || DIY Wireless Switch forElectronic Lights - Easy Guide!
1:01
HUBAB__OFFICIAL
Рет қаралды 25 МЛН
iPhone 16 с инновационным аккумулятором
0:45
ÉЖИ АКСЁНОВ
Рет қаралды 6 МЛН
В России ускорили интернет в 1000 раз
0:18
Короче, новости
Рет қаралды 1,8 МЛН