Thank you all for watching and for your support. ►► If you want to master Web API development using best practices, check out our Web API book: bit.ly/3x75ZMM ►► Also, to build great full-stack apps with Blazor, check out our course: bit.ly/3Pw3Y33
@Tamer_Ali6 ай бұрын
Thanks a lot @CodeMaze for talking about Cache Stampede using SemaphoreSlim in In-Memory Caching. I was looking for that topic
@CodeMaze6 ай бұрын
Glad it was helpful! Thank you for watching the video.
@elijah51764 ай бұрын
You are a great tutor
@CodeMaze4 ай бұрын
I appreciate that! Thank you.
@vijayakumar15914 ай бұрын
Awesome demo
@CodeMaze4 ай бұрын
Thank you. Thanks for watching the video.
@curtisdave28587 ай бұрын
Thank you for this video, crazy that it was just created yesterday😂. Right timing for me I guess
@CodeMaze7 ай бұрын
You are most welcome. Thank you too for watching the video. As many would say, there is no wrong time for good stuff :)
@davood74977 ай бұрын
Good one !!!
@CodeMaze7 ай бұрын
Thank you! Cheers!
@Tamer_Ali7 ай бұрын
Thanks @CodeMaze for the video. Are you going to talk about cache stampede?
@CodeMaze7 ай бұрын
Thank you too for watching. I will see about that topic. It is interesting for sure, just can be a bit more theoretical as well. Thank you for the suggestion though.
@Tamer_Ali6 ай бұрын
I'd like to create a service for caching. should I return ValueTask instead of Task from the methods? ValueTask SetAsync(string key, T value, CancellationToken token = default)
@CodeMaze6 ай бұрын
Using ValueTaks with caching operations should be recommended but also tested with benchmarks. It doeasn't have to be a faster operation, because that's not the main purpose for ValueTask, but it can definitely reduce memory allocations. We have a great article on that topic: code-maze.com/csharp-task-and-valuetask/, you can find a bit more info there.
@Tamer_Ali6 ай бұрын
@@CodeMaze I already read it 👍
@w1llow015 ай бұрын
what benefits are provided by fixing the size limit to a certain number? Also if I don't add a size can I consider the app will keep caching without restrictions?
@CodeMaze5 ай бұрын
Hi. Let me quote the Microsoft docs: "If SizeLimit isn't set, the cache grows without bound. The ASP.NET Core runtime doesn't trim the cache when system memory is low. Apps must be architected to: Limit cache growth. Call Compact or Remove when available memory is limited." So as you can read, if you don't specify the size limit it can lead to low memory issues. It is up to a developer to set the size and manage the cache.
@Mikewendwosen5 ай бұрын
can you do Response cache using Marvin Cache Headers library its not clear on the book.
@CodeMaze5 ай бұрын
Hi. We are not using Marvin Cache anymore in the second edition. But to be honest, even if I would do that video, I don't think I would be able to explain it any clearer than I did in the book :)