How to effectively use Redis Cache in .NET Core (Framework, Standard)

Поділитися
Вставка
  • Опубліковано 8 січ 2025

КОМЕНТАРІ •

  • @MarcusOrciuch
    @MarcusOrciuch 4 роки тому +25

    One of the most underrated tutorial channels on UA-cam. Keep it up!

  • @calinmarian2553
    @calinmarian2553 3 роки тому

    Good tutorial, Nick. Used this pub/sub feature in one of the projects to comunicate between admin part an the public website, very simple and elegant solution.

  • @partialinfinity
    @partialinfinity 4 роки тому +1

    Great video! I like how you explained each step and incorporated Docker.

  • @ades3967
    @ades3967 4 роки тому +1

    You're the best man! Best tutorials on UA-cam

  • @swenmeinert3967
    @swenmeinert3967 4 роки тому

    Perfect explanation. Should be model to every attempt out there.

  • @ismailkhouya2923
    @ismailkhouya2923 2 роки тому

    Thanks a lot , your explanation is literally perfect

  • @noblenetdk
    @noblenetdk 3 роки тому

    I know it's not relevant, but I love the sound of your keyboard - what make/model? Keep Youtubing! This is clearly my favorite channel to keep up and to be inspired

  • @RandallEike
    @RandallEike 3 роки тому

    Best Redis video ever!

  • @JohnLovell-FTW
    @JohnLovell-FTW 3 роки тому

    Now I remember why I stopped writing .net apps :) Great tutorial tho!

  • @MatthewKrieger
    @MatthewKrieger 4 роки тому +5

    @Nick Do you have a recommendation for a standard pattern for grabbing data from the database if the cache isn't populated, and then for updating the cache?

  • @JAYLATHIA
    @JAYLATHIA 2 роки тому

    Very well explained...
    Lovely

  • @wowDepressive
    @wowDepressive 4 роки тому

    this was really helpful and quick, thanks.

  • @SanjayKumar-tw6sp
    @SanjayKumar-tw6sp 4 роки тому

    Appropriated Nice One!!! . I am expecting advance video on this topic.

  • @ismailbenjemra7240
    @ismailbenjemra7240 Рік тому

    Hello that's good content,can you please make an example for a Redis with certificate connection and Login and Password ?

  • @Zhovten
    @Zhovten 4 роки тому +1

    should I use Microsoft.Extensions.Caching.StackExchangeRedis or StackExchange.Redis

  • @kolesplace
    @kolesplace 4 роки тому

    Thanks Nick. I'm curious how others would handle per-user settings.

    • @nickchapsas
      @nickchapsas  4 роки тому +1

      On a per-users scenario you have to bake the user identifier into the redis key

    • @kolesplace
      @kolesplace 4 роки тому

      @@nickchapsas Excellent, that is what I was thinking but wasn't sure if my thinking was in-line with the best practice. Thank you for replying.

  • @aravindpk9736
    @aravindpk9736 2 роки тому

    Hi Nick, so what is the difference between using this StackExchange.Redis nuget directly vs using using Microsoft.Extensions.Caching.Distributed, and using it there..?

  • @GovernorSilver
    @GovernorSilver 4 роки тому

    I can't get your example to build because Visual Studio cannot find that class NewCacheEntryRequest that you used in your CacheController. Is there any particular reason you had to use that request class instead of just passing in a key and value?

  • @GovernorSilver
    @GovernorSilver 4 роки тому +1

    Hi, I subscribed to your mailing list but still could not find the source code that was used in the video. Also, if I wanted to start from scratch, would it be to just do a dotnet new console on the command line?

  • @nonatw7956
    @nonatw7956 5 років тому +2

    hey nick can you add elastichsearch and CI/CD video ?

    • @nickchapsas
      @nickchapsas  4 роки тому +4

      Elastic search is coming really soon and I am planning to do cover a few CI and cd videos too

  • @maartenvissers283
    @maartenvissers283 3 роки тому

    How would you implement this in a Clean Architecture structure? (MediatR, Query, Commands).

  • @entityhomecinema
    @entityhomecinema 3 роки тому

    Can one configure maxmemory-policy through StackExchange Redis?

  • @Zhovten
    @Zhovten 4 роки тому

    does subscriber work in oneMessage-to-oneSubscriber mode or one-to-many (assuming I run a cluster of web apps)?

  • @user-rp9iis1en6h
    @user-rp9iis1en6h 2 роки тому

    Is there any way to perform query on stored data using .NET ?

  • @clashclan4739
    @clashclan4739 2 роки тому

    Serialization and deserialization make redis slow, it beats the purpose. do you have any improvements?

  • @ayushgupta9892
    @ayushgupta9892 4 роки тому +1

    Hi, what happens when I have 500 parallel requests trying to write data to cache, I want to allow only one request to write data to cache and rest 499 request to read data, considering there are multiple web servers running. Something like avoiding multiple same updates on a key and improving the efficiency

    • @Karma-rq9vn
      @Karma-rq9vn 4 роки тому

      You can't, however you can use different Redis "commands" like set if not exists or set if exists, and for example incrementing a value is atomic, so if you increment a value, from different sources, all of them will be applied.

  • @native-nature-video
    @native-nature-video Рік тому

    Thank you!

  • @kevinmarkandrada
    @kevinmarkandrada 5 років тому +2

    Hi @nick! Great video again! I just wanna ask what will happen if the master fails or crash. Does the slave automatically took place in writing the cache? Thanks and Godless! Hoping for another video that will be covered the rabbitmq or kafkha.

    • @nickchapsas
      @nickchapsas  5 років тому +1

      In case of disaster on the master the Redis Sentinel will trigger an automatic failover and the replica will take over. You can also trigger that process manually.

    • @kevinmarkandrada
      @kevinmarkandrada 5 років тому

      @@nickchapsas Is there any configuration of redis sentinel or it's on the fly?

  • @acp3012
    @acp3012 2 роки тому

    I am getting the below error when i try redis cache. I ran docker on my local linux m/c and did the same demo. Here is the error message i got when i kit the Post method to store data in reids db.
    Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware[1]
    An unhandled exception has occurred while executing the request.
    StackExchange.Redis.RedisTimeoutException: The timeout was reached before the message could be written to the output buffer, and it was not sent
    I search in google and added some other optional values to the redis connection string as below
    localhost:6379,abortConnect=false,connectTimeout=30000,responseTimeout=30000".
    but the problem not resolved.

    • @acp3012
      @acp3012 2 роки тому

      Never mind. Looks like it is port issue, When i mapped the map 6379 to another port (-p6070:6379), it works fine. Thanks for the nice video

  • @shuvo9131
    @shuvo9131 3 роки тому

    nice one. thanks.

  • @saeedsedigh443
    @saeedsedigh443 3 роки тому

    Thank u so much!

  • @ibknl1986
    @ibknl1986 3 роки тому

    A very wonderful channel. Thank you for making these videos and helping us. May Allah ( God) guide and bless you and.

  • @Geoters
    @Geoters 4 роки тому +2

    Sorry, you failed to mention is why would we want to have a replica? What is the benefit? Does it allow me to bring the master computer down for maintenance? And if it does, my replica becomes a master in this case?

  • @OminusRumors
    @OminusRumors 4 роки тому

    Nice vid! I only hope that your chapsa is not too big. :P

  • @knightmarerip711
    @knightmarerip711 4 роки тому

    Coll stuff, but... How do I define servers with different passwords? How do I set this up in the start up?

    • @nickchapsas
      @nickchapsas  4 роки тому

      The connection string allows for that. You can check all the allowed settings here: stackexchange.github.io/StackExchange.Redis/Configuration.html

  • @mohamedsalman3205
    @mohamedsalman3205 3 роки тому

    Thank you

  • @OvRaf
    @OvRaf 4 роки тому

    great!

  • @oktaysezgin8277
    @oktaysezgin8277 4 роки тому

    hi Nick, thanks a lot for the videos. However, I cannot find the source code for this video in your github repos. Oktay

    • @nickchapsas
      @nickchapsas  4 роки тому

      Oh my god sorry for that. I forgot to push the commit. It should be up now.

    • @oktaysezgin8277
      @oktaysezgin8277 4 роки тому

      no worries.. thanks a lot..

    • @oktaysezgin8277
      @oktaysezgin8277 4 роки тому

      no worries... thanks a lot

    • @lauriedickinson5373
      @lauriedickinson5373 4 роки тому

      I can't find it either. What repo is it in? Also, yes, great video. Thanks!

  • @Will_Huang
    @Will_Huang 4 роки тому

    Get the source code: eepurl.com/gLjkuv
    The link is wrong.

  • @clearlyunwell
    @clearlyunwell 3 роки тому

    👍🏽

  • @dzsukov
    @dzsukov 4 роки тому

    Great Tutorial! Thanks. One question I seem to be unable to find, has anyone figured out how to retrieve a list of values based on keys with wildcards ? In "Native" redis: SET user:1 "Nick"; SET user:2 "Daniel" and then KEYS user:* withh give me the result. Another option is Scan with pattern matching which I also could not find in this package

    • @Karma-rq9vn
      @Karma-rq9vn 4 роки тому

      If you want a list of values, maybe you can use the Hash data type, or a hash of the Redis Keys, you want to retrieve.

  • @rubeushagrid4131
    @rubeushagrid4131 3 роки тому

    Not everyone reach upto here.

  • @advanceduser3713
    @advanceduser3713 2 роки тому

    Speak too fast.. :(