Intro to Redis in C# - Caching Made Easy

แชร์
ฝัง
  • เผยแพร่เมื่อ 29 ธ.ค. 2024

ความคิดเห็น • 456

  • @magnus7538
    @magnus7538 4 ปีที่แล้ว +83

    30 minutes ago I searched for "Tim Corey Redis" to see if you had a tutorial on it. Then I get a notification.. Fantastic!

    • @IAmTimCorey
      @IAmTimCorey  4 ปีที่แล้ว +33

      Staying in tune with my viewers and the industry, ... but that is a bit freaky. :)

    • @rubeushagrid4131
      @rubeushagrid4131 3 ปีที่แล้ว

      Its not that freaky if its really your business to understand it.

  • @TheOceanLoader
    @TheOceanLoader 4 ปีที่แล้ว +3

    I've just discovered you, Mr Tim Corey! Having been thoroughly informed on Redis with this great tutorial, it's a given in my brain. You are an absolute legend for all of your hard work so that all of us pick it up.. So much. So useful. So free! What's the catch Tim? How come they are trying to charge me hundreds of dollars for the same sort of video on sites like Udemy and Pluralsight - so why is this different with you?
    You must be a saint. The stuff you have taught me will increase the chances of me getting specific roles. There was no sign-up process that stole my data in order to heavily market me offers on Redis subscriptions, etc.
    Purest form of altruism, Tim! Massive thank you dear Sir! May your future be safe and secure. May He bless you for your kindness. Thank you. Thank you.

    • @IAmTimCorey
      @IAmTimCorey  4 ปีที่แล้ว +2

      Why thank you, but know that my family does have to eat. I have a paid site and a Patreon option for those that want to help fund the free content. You said you just discovered my materials, have you seen the Path video where I explain much of this? - th-cam.com/video/LUv20QxXjfw/w-d-xo.html

    • @TheOceanLoader
      @TheOceanLoader 4 ปีที่แล้ว

      @@IAmTimCorey I have now - with many thanks! Once I have been paid for my current invoice, I will kick back where I can.
      I'm a senior developer - with VBA back 15 years ago - through classic ASP, Win Forms, VB.NET, MVC.NET, DotNet Core, etc

  • @ignask2216
    @ignask2216 4 ปีที่แล้ว +31

    Taking a look at recent video releases, it looks like Tim started reading my mind. Awesome content.

    • @IAmTimCorey
      @IAmTimCorey  4 ปีที่แล้ว +4

      I try to stay in tune with my viewers

  • @dhruvpanchal9010
    @dhruvpanchal9010 3 ปีที่แล้ว +1

    Now a days, I daily need to come to your channel for a new topic. And everytime, i gather something very useful knowledge.

  • @RalfsBalodis
    @RalfsBalodis 4 ปีที่แล้ว +39

    0:00 - Intro
    1:07 - Creating Blazor Server demo app
    2:41 - Simulating wait on data access: AsyncTask Delay
    9:05 - Redis Sever using Docker
    16:01 - Caching NuGet
    17:41 - Application configuration for Redis
    21:11 - Redis connection string
    23:00 - Extensions: helper methods for caching
    40:58 - Implementing caching with Redis
    57:38 - Loading data vs cache in action
    1:01:16 - Recap
    1:02:20 - Azure Redis server
    1:13:25 - Stop and remove Redis server on Docker
    1:15:40 - Remove Redis on Azure
    1:18:37 - Summary and concluding remarks

    • @IAmTimCorey
      @IAmTimCorey  4 ปีที่แล้ว +12

      Thanks. This is really helping other folks in the community, based on the many comments I get.

    • @saeedsedigh443
      @saeedsedigh443 3 ปีที่แล้ว

      this guy waste a lot of time for real.

    • @carstenberggreen7509
      @carstenberggreen7509 2 ปีที่แล้ว

      @@saeedsedigh443 waste??? what do you mean? he is teaching a LOT of developers on how to do stuff that some people find hard to figure out?

    • @robertgreen5333
      @robertgreen5333 2 ปีที่แล้ว

      @@saeedsedigh443 You are WRONG! Thanks soooo much for Tim!!!

    • @reikooters
      @reikooters 2 ปีที่แล้ว

      @@carstenberggreen7509 I appreciate the effort it takes to create videos and share knowledge, but I do agree he wastes too much time. He has this video on an "Advanced C#" playlist, but then spends 3 minutes creating a new project and keeps stopping throughout the video to spend a long time explaining basics of the language. For example, at 23:00 he spent 17 minutes to write 2 functions which are only a few lines of code each while talking about what an extension method is and what null is. Maybe I'm just the wrong target audience and it's more aimed at absolute beginners, but I do think if someone is at the point that they want to learn how to improve the performance of their app with caching, they're already very familiar with the language features he is using here.

  • @mohammedfaizsanusi4876
    @mohammedfaizsanusi4876 3 ปีที่แล้ว +1

    Absolute Best TH-cam Tutor. I really enjoy your videos more than the ones I pay for. Kudos man.

  • @kalleguld
    @kalleguld 4 ปีที่แล้ว +21

    Looking forward to the RabbitMQ intro :)

    • @IAmTimCorey
      @IAmTimCorey  4 ปีที่แล้ว +9

      Added to the suggestion list.

  • @zoltan.halasz
    @zoltan.halasz 4 ปีที่แล้ว

    I heard about Redis but have not tried it before. I know it can make web apps quicker. Now after this tutorial it's much clearer to me!

  • @seanki
    @seanki 4 ปีที่แล้ว

    Sweet, was talking to my colleagues about caching in .Net today at work and they told me to look into Redis. Impeccable timing Tim!

    • @IAmTimCorey
      @IAmTimCorey  4 ปีที่แล้ว +1

      Glad I could help!

  • @zuhaibahmed2241
    @zuhaibahmed2241 4 ปีที่แล้ว +9

    Hey Tim, you’re an awesome teacher.
    I’ve been a huge fan of your videos because they are simple, focused on real world scenarios and inculcate best practices along the way.
    I would really like you to create a video tutorial on Kubernetes and docker.
    Really appreciate your services to the community, not a lot of people share best practices easily.

    • @IAmTimCorey
      @IAmTimCorey  4 ปีที่แล้ว +1

      I showed off a lot on how to use Docker in this video: th-cam.com/video/Yj69cWEG_Yo/w-d-xo.html
      I also have a Getting Started with Docker course: www.iamtimcorey.com/p/getting-started-with-docker
      I will be doing more with Docker and K8s in the near future.

  • @JaskiratSingh-pn9sv
    @JaskiratSingh-pn9sv 2 ปีที่แล้ว

    You're the real savior my friend, God bless the kind people.

    • @IAmTimCorey
      @IAmTimCorey  2 ปีที่แล้ว

      I am glad it was so helpful.

  • @jesusdelarua5995
    @jesusdelarua5995 3 ปีที่แล้ว

    Tim, this is the most instructive video I have found regarding using Redis for caching.
    I have looked at several, but they do not explain the level of details you have explained in this video. You have explained in a such way, that any beginner like me will understand and will be able to implement.
    Thank you, Thank you very much for doing this for us.
    I really appreciate it.

    • @IAmTimCorey
      @IAmTimCorey  3 ปีที่แล้ว

      I am glad it was so helpful.

  • @readingcurious3117
    @readingcurious3117 3 ปีที่แล้ว

    I really liked your explanation. It is very clear, practical and no up in the air talks. Redis explained spot on :)

    • @IAmTimCorey
      @IAmTimCorey  3 ปีที่แล้ว

      Glad you enjoyed it!

  • @razor23Ukraine
    @razor23Ukraine 4 ปีที่แล้ว +2

    Thanks, Tim!
    Now we are really waiting for RabbitMQ! And waiting from you exactly because you can make it in the best way :)
    P.S. oh, just noticed a video about Azure service bus, it might be somewhat related, so I'm gonna watch it now!

    • @IAmTimCorey
      @IAmTimCorey  4 ปีที่แล้ว +2

      I appreciate the suggestion and added it to my list.

  • @fsfehico
    @fsfehico 4 ปีที่แล้ว +1

    You really make building .NET projects easy. Thanks Tim.

  • @AhmedMohammed23
    @AhmedMohammed23 4 ปีที่แล้ว

    firefox - microsoft terminal - powershell core this video is on fire

  • @shahzshafie
    @shahzshafie 4 ปีที่แล้ว

    wozers! very easy to understand video on Redis. Before this i imagine to setup Redis is kinda complicated and to learning it takes time.. i was wrong! and very easy to use it in .NET Core project! thanks Tim!

    • @IAmTimCorey
      @IAmTimCorey  4 ปีที่แล้ว

      Glad it was helpful!

  • @ardavaztterterian1211
    @ardavaztterterian1211 4 ปีที่แล้ว +3

    I was just implementing Redis in my project and was struggling with an error I couldn't resolve. And boom, Tim Corey uploads a video on Redis. What are the chances!! Thank you

  • @alvinbernardo9551
    @alvinbernardo9551 3 ปีที่แล้ว

    always great tutorial from Tim Corey

  • @piotr6215
    @piotr6215 3 ปีที่แล้ว

    Very informative video. Really good practical example with Amazon at the end.

  • @tayebhimel4493
    @tayebhimel4493 4 ปีที่แล้ว

    I don't know why every time you posted a new video it makes me happy. :)

  • @carstenberggreen7509
    @carstenberggreen7509 2 ปีที่แล้ว

    Tak!

    • @carstenberggreen7509
      @carstenberggreen7509 2 ปีที่แล้ว

      Simple and easy to watch as usual. Brought me forward without having to read long tutorials. This was simple and elegant. Only struggle is that I have moved to VS2022 and .NET 6, so the Configuration/ConnectionString was a bit different, but simple once you know how.

    • @IAmTimCorey
      @IAmTimCorey  2 ปีที่แล้ว

      Thank you!

  • @ramansehdev8235
    @ramansehdev8235 3 หลายเดือนก่อน

    Very helpful & lot of value. Thanks Tim!

    • @IAmTimCorey
      @IAmTimCorey  3 หลายเดือนก่อน +1

      You are welcome.

  • @tim90s
    @tim90s 3 ปีที่แล้ว

    Thank you Tim, your explaination is very clear.

  • @mateoortiz9286
    @mateoortiz9286 ปีที่แล้ว

    Once again Great job! Very well done!

  • @themusic1609
    @themusic1609 ปีที่แล้ว

    Great explained, Thanks Tim

  • @GaryWee111
    @GaryWee111 2 ปีที่แล้ว

    Thank you for your time making this! It is extremely useful to me!

    • @IAmTimCorey
      @IAmTimCorey  2 ปีที่แล้ว +1

      You're very welcome!

  • @jimmcnulty1449
    @jimmcnulty1449 4 ปีที่แล้ว +1

    Thanks for the Outstanding video Tim. You are a good man.

  • @enyeluchukwuebukaj.7600
    @enyeluchukwuebukaj.7600 ปีที่แล้ว

    Hello Tim, thank you for this nice video. It was really clear to understand on one go!

  • @Otonium
    @Otonium 4 ปีที่แล้ว +5

    PA I just love your series Tim, the tempo, the topics you cover, the quality of the samples.... and your invaluable real world insights.
    But I sometimes miss the TH-cam feature which divides your video in segments. If you add those timestamps, so medium, or even advanced developers (viewers with some experience with the reasons or scenarios) can skip a bit, It would be great. While preserving the ultra useful basics for the newcomers at the same time.
    That kind of organization in your course wound be even better. Certainly a win-win scenario. Thank you!

    • @IAmTimCorey
      @IAmTimCorey  4 ปีที่แล้ว +2

      When you do see those on my videos, you can look at the video notes and see that they were usually provided by viewers like you. They are great but I just don't have the time to do it. If you are the type person that keeps notes and wants to place the timestamps/chapters in the comments, I will gladly add them to the videos.

  • @RobReynolds
    @RobReynolds 4 ปีที่แล้ว

    yet again, super useful content Tim. thanks for the video

  • @timw1971
    @timw1971 3 ปีที่แล้ว

    Great vid. Very clear. Thanks for uploading.

  • @appleton6509
    @appleton6509 4 ปีที่แล้ว

    All of your videos are really well done. Very thorough explanations. Thanks for sharing your knowledge!

  • @0i0l0o
    @0i0l0o 2 ปีที่แล้ว

    Sweet stuff. Thank you Corey.

  • @azrinsani
    @azrinsani 3 ปีที่แล้ว +7

    Hi Tim, question: What's wroing with just using an RDBMS? Don't RDMS servers like MSSQL also have caching?

    • @IAmTimCorey
      @IAmTimCorey  3 ปีที่แล้ว +13

      Speed is the issue. Caching needs to be as quick as possible. Otherwise it isn't valuable. If you tried creating a caching table in SQL, for instance, every insert would trigger a log event in SQL. It would also write to the disk. That's at minimum. Then, when you did a lookup, it would create an execution plan, do a seek to the correct location, read that location off of disk, and then transfer the data. With Redis, everything is stored in memory. There is no writing to disk. There is no logging. This is a big difference.

    • @azrinsani
      @azrinsani 3 ปีที่แล้ว +3

      @@IAmTimCorey Thanks Tim, but can we not simply use c# ConcurrentDictionaries as a cache? Would probably serve the same purpose wouldn't it?

    • @rcamine
      @rcamine 3 ปีที่แล้ว +6

      @@azrinsani if your app goes down all data goes down with it in this scenario

  • @justinm412
    @justinm412 3 ปีที่แล้ว

    31:20 Why do we want the cached items for such a short time? Is this just general practice or a case-by-base basis? Great video and channel as well, thank you good sir!

    • @IAmTimCorey
      @IAmTimCorey  3 ปีที่แล้ว +1

      It does depend on the situation. How quickly your data might change depends on the data. A list of US states won't change very often (but it may change, just to be clear). A list of customers changes quite a bit more quickly.

    • @justinm412
      @justinm412 3 ปีที่แล้ว

      @@IAmTimCorey Got it, thank you for your prompt response and for the great content. It's been tremendously helpful!

  • @mthokozisimtolo8910
    @mthokozisimtolo8910 4 ปีที่แล้ว +1

    As always, absolutely great content!

  • @morhebbek
    @morhebbek 4 ปีที่แล้ว

    hello master Tim, and thank you for all your great work
    I just got a job as a developer, a trainee currently, and your videos were very helpful to show my mentors that i am learning
    unfortunately, I am from Lebanon and I can pay anything online, but maybe when i start getting salary i will,
    and if i do i will register to your courses

    • @IAmTimCorey
      @IAmTimCorey  4 ปีที่แล้ว +2

      The reason I do this work is so you can have a better life, not to force you to pay me money. I am thrilled to hear about your job. Check out my Dev Questions playlist/podcasts and my Blog to help you when you find workplace challenges. Both at IAmTimCorey.com. Good luck in your new position! I am very proud of you.

  • @brianbarnett208
    @brianbarnett208 2 ปีที่แล้ว

    Great video Tim. I did have a question. Do you have any examples of setting up Redis to notify a .NET application/service whenever a key value gets changed? I've seen that Redis has that capability but haven't seen any .NET examples of how to subscribe to these event messages.

    • @IAmTimCorey
      @IAmTimCorey  2 ปีที่แล้ว

      I don't have that example, but if you want you can add it to the suggestion list: suggestions.iamtimcorey.com

    • @brianbarnett208
      @brianbarnett208 2 ปีที่แล้ว

      @@IAmTimCorey can do. I did find some info on it here - stackoverflow.com/questions/23180765/redis-keyspace-notifications-with-stackexchange-redis

  • @KouroushMetal
    @KouroushMetal 4 ปีที่แล้ว

    I usually use memurai on windows and EasyCaching on all asp.net core apps and the amount of load it push back from server is huge. thanx for video.

    • @IAmTimCorey
      @IAmTimCorey  4 ปีที่แล้ว

      Glad you found something that works for you.

  • @giftayodele
    @giftayodele 2 ปีที่แล้ว

    Hi Tim. Thanks for this video. Can you reply with a link to your Getting started with ASP.NET Core video you talked about in 1:47

    • @IAmTimCorey
      @IAmTimCorey  2 ปีที่แล้ว

      Here you go: www.iamtimcorey.com/p/getting-started-with-aspnetcore

  • @daltonj507
    @daltonj507 4 ปีที่แล้ว

    Thanks so much! I was just about to find a good video on redis so I was very happy when I saw you post a video, great video. Very clear and detailed.

  • @СяргейЖук
    @СяргейЖук 3 ปีที่แล้ว +1

    it's a really great tutorial. Thanks!

  • @robertgelb9385
    @robertgelb9385 4 ปีที่แล้ว +3

    Tim, one thing that might be useful (and I've done in the past) is a method for downgrading from Redis to local caching if it becomes unavailable (like when you unplugged the docker container). And then automatically switching to Redis when it does come back online.

  • @BloodHaZaRd666
    @BloodHaZaRd666 ปีที่แล้ว

    Love it, very clear Thx Tim

  • @kevinblount1242
    @kevinblount1242 4 ปีที่แล้ว

    Tim... I was wondering why you dont access the redis cache from behind the service layer (ie inthis case the ForecastService ... which generally would either be a Data library or an API and thence would be more usable if we switched from razor to something else ?

    • @IAmTimCorey
      @IAmTimCorey  4 ปีที่แล้ว

      This was a demo to show off how Redis works. It wasn't really designed to show it off in a real-world design. In the real-world, we wouldn't be getting data that is auto-generated. I put it where I did to show off what you would do at the end of the API, rather than mixing it with the data access and confusing people. I'll be using it in a start to finish course one of these days. Then I'll put it in the right place.

    • @kevinblount1242
      @kevinblount1242 4 ปีที่แล้ว

      @@IAmTimCorey Thanks for clearing that one up.... I suspected as much! How you get the time to do what you do is beyond me :-)

  • @girornsveinsson7970
    @girornsveinsson7970 4 ปีที่แล้ว

    Another question. What is the best way to handle it if the redis service is down and you cannot connect to it? Try-Catch in the LoadForecast() kind of solves it but it makes the application super slow if it is trying to connect to redis every time without success.

  • @marcusmaunula5018
    @marcusmaunula5018 4 ปีที่แล้ว +1

    I was wondering about In-memory caching vs ResponseCache. Have you talked about those in previous videos? Mainly for WebAPI

    • @IAmTimCorey
      @IAmTimCorey  4 ปีที่แล้ว +3

      I haven't yet. I'll put that suggestion on the list.

  • @jeppechristensen5707
    @jeppechristensen5707 3 ปีที่แล้ว

    What an effort you put into this. Thanks alot!

  • @amitj_1
    @amitj_1 3 ปีที่แล้ว

    Amazing content. Thanks a lot for the Video. It's really Caching Made Easy :)

  • @Aphradity
    @Aphradity 3 ปีที่แล้ว

    Tim, would you, or would you not, recommend using Redis in production? Are there any "gotcha's" to be aware of if doing so?

    • @IAmTimCorey
      @IAmTimCorey  3 ปีที่แล้ว

      I am a fan of it. Use it like I showed you and use it wisely and you should be fine.

  • @angelvids6024
    @angelvids6024 4 ปีที่แล้ว +1

    Hi Tim, love the new video. I signed up to your C# courses and am really getting a lot out of them, so thanks for all you do. Suggestions for videos/courses. Something I'd really like to see is building upon some of the courses you've already done relating to databases. That is, accessing databases securely, I can see you have tutorials on accessing databases, but in a fairly recent video regarding database security you recommend users don't send credentials from their application to the remote DB for security reasons, you talked about using stored functions and creating our own API's to interact securely with remote DB, so perhaps a guiding showing us how to do this. For example a user sign in system from a WPF app to remote DB or getting product info from DB properly and securely. That would be really great to see, perhaps with Azure as well?

    • @IAmTimCorey
      @IAmTimCorey  4 ปีที่แล้ว +1

      Noted... Its on the list.

    • @angelvids6024
      @angelvids6024 4 ปีที่แล้ว

      @@IAmTimCorey Lol yeah it was a bit longer than intended 😂 Edited it down, note to self, stop writing messages on multi sessions and forgetting what you wrote.

  • @DevMadeEasy
    @DevMadeEasy 4 ปีที่แล้ว

    Another masterpiece, grateful to share with us!

  • @shaktisingh-lu3dm
    @shaktisingh-lu3dm 3 ปีที่แล้ว

    Many Thanks for the wonderful help you are doing to seekers like me. :)

  • @nabeelkhan2632
    @nabeelkhan2632 3 ปีที่แล้ว

    Excellent video @IAmTimCorey. Unlike your other videos, in the beginning of this video you did not tell us why use Redis and not IMemoryCache provided by Microsoft. Or in what situations to prefer one over the other!

  • @piranha1337
    @piranha1337 4 ปีที่แล้ว

    Yay a new practical video 🥰
    Topic suggestion: Allocation free c#. What's span about? A lot of people getting in touch with C# through Unity so shaving of another 2ms from your render loop can actually matter! :)

    • @IAmTimCorey
      @IAmTimCorey  4 ปีที่แล้ว

      Added to the list for consideration.

  • @montanomariano
    @montanomariano 2 ปีที่แล้ว

    Thanks Tim, I loved the explanation!
    Is it advisable to use redis in docker in production environment?

    • @IAmTimCorey
      @IAmTimCorey  2 ปีที่แล้ว +1

      You can. It depends on your need and what your setup looks like. Kubernetes is basically just a bunch of Docker containers. You put your entire stack in those sometimes. However, in other situations, it is better to have Redis on a dedicated server.

    • @montanomariano
      @montanomariano 2 ปีที่แล้ว

      @@IAmTimCorey thanks a lot for your answer!

  • @Gray-Wolf-Media
    @Gray-Wolf-Media 4 ปีที่แล้ว +2

    Tim have you thought about doing an into to AWS?

    • @IAmTimCorey
      @IAmTimCorey  4 ปีที่แล้ว +1

      Added to the list, maybe someday I can get to it.

  • @jairusshole8622
    @jairusshole8622 4 ปีที่แล้ว

    Thanks for this great video Tim, as always; great work.

  • @user-ey2ei4oz3m
    @user-ey2ei4oz3m 4 ปีที่แล้ว

    Tim keep up the awesome content!

  • @bozapa
    @bozapa 7 หลายเดือนก่อน

    Is there a way to make sure that when SetRecordAsync is executed, that record is added to another server and vice versa?

  • @RamiNassarPlus
    @RamiNassarPlus 2 ปีที่แล้ว

    Hi Tim, thanks for your video.
    I have a question how can I tweak your extension file in case not to fail if redis server is down and continue to read the data from db?

    • @IAmTimCorey
      @IAmTimCorey  2 ปีที่แล้ว

      Redis will timeout if it isn't available. Watch for that timeout and write the necessary code to ignore it and use the live data.

  • @miladabdi3191
    @miladabdi3191 2 ปีที่แล้ว

    Thanks for your awesome and usefull videos. Thanks a lot. 🙏🙏🙏

  • @АртёмАртём-ю4ы
    @АртёмАртём-ю4ы 3 ปีที่แล้ว +1

    Thank you so much. Can you tell us about the interaction of Redis with GraphQL, in particular with the HotChocolate library?

    • @tomthelestaff-iamtimcorey7597
      @tomthelestaff-iamtimcorey7597 3 ปีที่แล้ว

      That is a bit specific. I have added this to Tim's list of possible future topics. He uses the list to see common trends and requests that would help the most folks.

  • @luigiglorioso548
    @luigiglorioso548 4 ปีที่แล้ว +1

    you're the best one. thank you.

  • @ajv2544
    @ajv2544 3 ปีที่แล้ว

    Hi Tim, we can use Memurai, and AnotherRedisDesktopManager to manage memurai, its an alternative redis version for windows and more fast than redis. no need to run docker

    • @IAmTimCorey
      @IAmTimCorey  3 ปีที่แล้ว

      The downside is that you need to install it. By running a Docker container, I don't need to install anything - when I need Redis, I just run one command. When I don't need it anymore, I run another command and it is gone.

  • @pujithreddy308
    @pujithreddy308 4 ปีที่แล้ว

    Really thankful for this awesome content

    • @IAmTimCorey
      @IAmTimCorey  4 ปีที่แล้ว +1

      Glad you enjoy it!

  • @dskunu
    @dskunu 3 ปีที่แล้ว

    Thanks a lot Tim!

  • @oliurrahman479
    @oliurrahman479 2 ปีที่แล้ว

    Thanks for ur awesome & valuable video.
    I have one question. Imagine i have employee list of data into redis cache then i am creating a new employee. Now Can i set my new employee data into existing cache list data??

    • @IAmTimCorey
      @IAmTimCorey  2 ปีที่แล้ว

      You can invalidate the cache or add it to the cache.

  • @PedroOliveira-jb5yz
    @PedroOliveira-jb5yz ปีที่แล้ว

    Fantastic video. There is a small bug on the LoadForecast, setting the key with "yyyyMMdd_hhmm" will not use 24 hours and mix 11h and 23h, should be "yyyyMMdd_HHmm"

  • @barisgokcan
    @barisgokcan ปีที่แล้ว

    Hi Tim, great video again. Out of curiosity, which keyboard model do you use? 😆

    • @IAmTimCorey
      @IAmTimCorey  ปีที่แล้ว

      I use the Logitech MX Keys keyboard: amzn.to/3YYBwcy

    • @barisgokcan
      @barisgokcan ปีที่แล้ว

      @@IAmTimCorey Are you happy using it so far? Do you think it is rigid and not bumping back while typing? Also would you prefer TKL version?

    • @IAmTimCorey
      @IAmTimCorey  ปีที่แล้ว

      I love it. I'm not sure what I would improve. It is amazing. It can connect to three different computers (which I use). The 10-key section is useful as well (for me), but if you don't need it, it would be fine without it.

  • @klob1100
    @klob1100 3 ปีที่แล้ว

    I really love your content man! thank you very much for sharing your knowledge!

  • @muhanad102
    @muhanad102 2 ปีที่แล้ว

    Hello Tim. I noticed that the extension where the Set and Get exist is "static". Does this affect the way the data is accessed in an async environment? Will the threads wait for the using thread to exist?

  • @JoshWright10
    @JoshWright10 2 ปีที่แล้ว

    Nice video, but I didn’t understand why you use a different key for the redis cache. Can’t you just use the same key name?

  • @nouman_baloch
    @nouman_baloch 4 ปีที่แล้ว +1

    Can you please share your thoughts about N-Cache as we are using that? Should we switch to Redis are keep using that? Thanks for such nice content.

    • @IAmTimCorey
      @IAmTimCorey  4 ปีที่แล้ว +1

      Added to my list to consider for future topics.

    • @nouman_baloch
      @nouman_baloch 4 ปีที่แล้ว +1

      @@IAmTimCorey just waiting eagerly, bundle of thanks.

  • @HungTran-jx2xc
    @HungTran-jx2xc 4 ปีที่แล้ว +1

    I'm still wondering what are the advantages of Redis Cache vs Dotnet core Cache in Memory ?
    Could you please clarify when should I use one vs another.

    • @IAmTimCorey
      @IAmTimCorey  4 ปีที่แล้ว +1

      Well, one of the basics is that an in-memory cache uses your memory. A database cache like Redis stores the data somewhere else. In-memory will be faster but it will also bog down your server if you use it with any scale.

  • @chimaokoli4943
    @chimaokoli4943 4 ปีที่แล้ว

    Thanks a lot, Tim Corey. Please can you do a video on how to record tutorial videos for youtube? Do you record the video first before voice over or do you do both at the same time?

    • @IAmTimCorey
      @IAmTimCorey  4 ปีที่แล้ว +1

      I can add that to the suggestion list. As for your specific question, I do everything together. I don't do voice overs. It is way too complicated and messy to try to do it that way.

    • @chimaokoli4943
      @chimaokoli4943 4 ปีที่แล้ว

      @@IAmTimCorey Alright...Thanks a lot

  • @cycostallion
    @cycostallion 4 ปีที่แล้ว

    Hi Tim, great short course to get started with Redis!
    While coding, I noticed you were getting an automatic prompt to bring in the namespaces of whichever classes you were using. It does not seem you were hitting Ctrl + . to import them.
    Please can you share what extension or option you are using to get that feature? Is it Resharper?

    • @IAmTimCorey
      @IAmTimCorey  4 ปีที่แล้ว +1

      That's part of the latest versions of Visual Studio 2019 (Community Edition).

    • @cycostallion
      @cycostallion 4 ปีที่แล้ว

      @@IAmTimCorey Thank you Tim, i will check it out in the latest version. I currently have Visual Studio Community 2019
      Version 16.7.7

  • @mutipotatohead
    @mutipotatohead 4 ปีที่แล้ว

    Tim thanks for a fantastic video! I am trying to deploy this but hit a snag: I have a console app that connects to redis ; both are on docker containers using docker-compose. What should the connection string be from my console app to access the redis container?

    • @IAmTimCorey
      @IAmTimCorey  4 ปีที่แล้ว

      You should have access to the container by name. You would use that name in the connection string.

    • @mutipotatohead
      @mutipotatohead 4 ปีที่แล้ว

      @@IAmTimCorey thank you! Love your videos btw. They give me a great starting point into new topics that would otherwise feel too daunting to start with!

  • @dirshusiyum3544
    @dirshusiyum3544 4 ปีที่แล้ว

    Tim I really appreciate your video.
    Would you be able to do a video on how to do searching with caching,

    • @IAmTimCorey
      @IAmTimCorey  4 ปีที่แล้ว +1

      Thanks, I added it to the suggestion list.

  • @mohamedfawzy6632
    @mohamedfawzy6632 4 ปีที่แล้ว

    thank you Tim. i just yet implement it in my site

  • @mihaimyh
    @mihaimyh 4 ปีที่แล้ว

    On Blazor Wasm you can use the browser local storage for caching.

    • @IAmTimCorey
      @IAmTimCorey  4 ปีที่แล้ว

      Yep. You might want to use Session Storage, though, since that won't clog up a user's machine between uses.

  • @abubakrbaxromov12
    @abubakrbaxromov12 2 ปีที่แล้ว

    Hi, can you make a full explanation video about the do's and dont's of sql views, stored procedures, functions in sql server?

    • @IAmTimCorey
      @IAmTimCorey  2 ปีที่แล้ว

      Thanks for the suggestion. Please add it to the list on the suggestion site so others can vote on it as well: suggestions.iamtimcorey.com/

  • @wubblyjuggly
    @wubblyjuggly 2 ปีที่แล้ว

    Excellent stuff

  • @VitaliyParitskiy
    @VitaliyParitskiy 4 ปีที่แล้ว

    0:50
    I'm learning C# MVC, and I'm struggling with where do I put my logic code, closer to MVC, using AJAX, that updates multiple elements - HTML DOM - independently and simultaneously. Simply told, how to update multiple elements of a (specific) HTML page using AJAX (async JS) requesting different types of data. With best regards, thank YOU.

    • @IAmTimCorey
      @IAmTimCorey  4 ปีที่แล้ว +1

      Logic code in MVC should not live in MVC at all but in a class library (separate from the UI - remember, all of MVC is UI including the controllers). As for updating pages based upon Ajax calls, it sounds like you are basically just making API calls to MVC (or should be). Not sure what the issue with updating multiple elements is, though. That's on your JavaScript code to do. That is one of the reasons I prefer Blazor Server.

    • @VitaliyParitskiy
      @VitaliyParitskiy 4 ปีที่แล้ว

      @@IAmTimCorey "separate from the UI - remember, all of MVC is UI including the controllers": All AJAX request should be handled in the Controllers?

  • @robbiexiong3508
    @robbiexiong3508 4 ปีที่แล้ว

    Ty. This tut came out at the right time and helped a lot

  • @cryptodaddy79
    @cryptodaddy79 4 ปีที่แล้ว

    Thanks so much for your awesome content. You explain it so well, I am really impressed.

    • @IAmTimCorey
      @IAmTimCorey  4 ปีที่แล้ว

      You're very welcome!

  • @tilenmokic
    @tilenmokic 3 ปีที่แล้ว

    Thanks for another great video. I was just wondering, why do you put time variable in recordKey and set an expiration on the same record? Would it not be enough just to set the expiration and have the same recordKey every time?

  • @mortezanejat8707
    @mortezanejat8707 3 ปีที่แล้ว

    I'm wondering that is Redis useful for cashing specific data belonging to each individual user? or there is better other option for this? I need to cache a large amount of data (about 10 MB per user) for searching in user data which is diff from others. The data that needs to be searched, dosen't need to interact with SQL server every time.

    • @IAmTimCorey
      @IAmTimCorey  3 ปีที่แล้ว +1

      Sure, that would work.

    • @mortezanejat8707
      @mortezanejat8707 3 ปีที่แล้ว

      @@IAmTimCorey thx 🙏 so for development you encourage us to use docker. Can we use redis image which is hosted on docker to publish it on the internet? (I know my question seems kinda stupid, hope you understand my worries) i just read on redis document that "docker imagese of redis enterprise software are certified for development and testing only"...

  • @moneyfresher3035
    @moneyfresher3035 3 ปีที่แล้ว

    Hi Tim, Another awesome video from you. I have a question for you. Like cookie authentication, do we have session based authentication in core? Redis could be more beneficial if we store the data for authentication purpose. I have seen various example of storing the data in session and retrieving back but nowhere found for authentication and authorisation purpose. Does session based authentication exists or it just used to store the data for state management?

  • @TaylorSchumacher255
    @TaylorSchumacher255 4 ปีที่แล้ว

    Thank you for the video! Could you do a video on Blazor WASM with Browser Cache? I am looking at doing a PWA and I wanted to understand the best practices for storing the data before going to the API (and failing gracefully when the API isn't available).

    • @IAmTimCorey
      @IAmTimCorey  4 ปีที่แล้ว +1

      Great suggestion! Added to the list.

  • @dotnetdeveloper288
    @dotnetdeveloper288 4 ปีที่แล้ว

    I am looking for MS Orleans with Tim Corey. If you can provide some help on that.

    • @IAmTimCorey
      @IAmTimCorey  4 ปีที่แล้ว

      That's probably too deep for what I cover. I've got a lot of territory to cover before I get there. Sorry.

  • @AonyjsViolmlar05
    @AonyjsViolmlar05 3 ปีที่แล้ว

    Great guide easy to follow and understand i hope you make a windows version of redis guide.

    • @tomthelestaff-iamtimcorey7597
      @tomthelestaff-iamtimcorey7597 3 ปีที่แล้ว +1

      Thanks for the recommendation. I have added it to Tim's list of viewer suggestions for videos.

  • @joebegly733
    @joebegly733 3 ปีที่แล้ว

    Great video! One tip on keeping it cleaner with your if/else with strings being null or empty (and the small bugs that can happen if you check for the wrong state) is to use the built in string method string.IsNullOrEmpty(stringVar)

  • @lcanchedou2413
    @lcanchedou2413 2 ปีที่แล้ว

    Hi, I am getting this error when running command in the console: Connection Failure: If this issue persists, ensure your computer's firewall and proxy settings allow outbound TCP traffic to port 10225. Using the firewall feature on your cache may also block connections from the console if your IP address has not been allowed.
    How to overcome it?

    • @IAmTimCorey
      @IAmTimCorey  2 ปีที่แล้ว

      Check the firewall. If you are using Redis in Docker locally, check to be sure you mapped the ports correctly.

  • @ukaffairs4132
    @ukaffairs4132 2 ปีที่แล้ว

    Tim I started a new job as a developer, worked mainly involved in object script programming IRIS , they are saying soon will switch to C#. I am beginner on C# , how quickly I can excel in my role and tell company know I’m more c# person .

    • @IAmTimCorey
      @IAmTimCorey  2 ปีที่แล้ว

      The C# Mastercourse is the fastest and best way to become great at C#: www.iamtimcorey.com/p/c-mastercourse

  • @KubilayBayraktar
    @KubilayBayraktar 2 ปีที่แล้ว

    Hi Tim, We have implemented Azure Cache. But azure cache redis returns data in 110ms but on the other hand db query takes 60ms. Why caching is slower than db, is there something wrong or it is not the always case the speed?

    • @IAmTimCorey
      @IAmTimCorey  2 ปีที่แล้ว +1

      It could be something wrong, or it could be fine. Caching isn't about pure speed. Speed is definitely a factor, but it isn't the only factor. For instance, you reduce the load on your database. That means the reads and writes you do need to do on your database are all faster. However, a 60ms read from your database (I'm assuming that is 60ms to the client, not just 60ms on the database) is very fast. That means you aren't doing much complicated work, or you don't have a lot of load on your database. 110ms from a cache isn't bad, but you might also look at the location of your cache. Is it in your region? Or is data transmission time part of the issue?
      I wouldn't get too focused on this at this time. Wait until you get into production and you see what the actual load looks like.

  • @angrykarrot
    @angrykarrot 4 ปีที่แล้ว +1

    Hey Tim, I am a basic C# self-taught programmer and I do my projects on VS. Some of the projects that ive created are making a pyramid of stars, calculating any year to know if it is a leap year or not, and reading the size of each folder I have in my C drive. With that, I do not have a degree yet, and would like to know if I have a chance of getting a job at a company as a junior developer or likewise. Thank you Tim.

    • @IAmTimCorey
      @IAmTimCorey  4 ปีที่แล้ว

      I would suggest you need to build up some more breath. My Foundation series is the best place to start. If you have not already, check out this video - th-cam.com/video/LUv20QxXjfw/w-d-xo.html It is intended to help you assess where you are and the topics you need to add to your base skills. I believe it will help you build on that base you have already. My goal is to make becoming a developer easier and I hope I can help you be successful through your full journey! Just don't give up. Its a journey of a life time.

  • @az6bcn
    @az6bcn 4 ปีที่แล้ว

    You said redis can be scaled, if you scale redis in Azure for example will the new item be inserted into all running instances of redis??

    • @IAmTimCorey
      @IAmTimCorey  4 ปีที่แล้ว

      It depends on how you set it up, but it can be.

  • @d.e_tech99
    @d.e_tech99 ปีที่แล้ว

    btw, how to set the specific cache for 15 mins?