Implementing In-Memory Caching in ASP.NET Core Applications

  Рет қаралды 4,692

Code Maze

Code Maze

Күн бұрын

Пікірлер: 26
@CodeMaze
@CodeMaze 7 ай бұрын
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_Ali
@Tamer_Ali 6 ай бұрын
Thanks a lot @CodeMaze for talking about Cache Stampede using SemaphoreSlim in In-Memory Caching. I was looking for that topic
@CodeMaze
@CodeMaze 6 ай бұрын
Glad it was helpful! Thank you for watching the video.
@elijah5176
@elijah5176 4 ай бұрын
You are a great tutor
@CodeMaze
@CodeMaze 4 ай бұрын
I appreciate that! Thank you.
@vijayakumar1591
@vijayakumar1591 4 ай бұрын
Awesome demo
@CodeMaze
@CodeMaze 4 ай бұрын
Thank you. Thanks for watching the video.
@curtisdave2858
@curtisdave2858 7 ай бұрын
Thank you for this video, crazy that it was just created yesterday😂. Right timing for me I guess
@CodeMaze
@CodeMaze 7 ай бұрын
You are most welcome. Thank you too for watching the video. As many would say, there is no wrong time for good stuff :)
@davood7497
@davood7497 7 ай бұрын
Good one !!!
@CodeMaze
@CodeMaze 7 ай бұрын
Thank you! Cheers!
@Tamer_Ali
@Tamer_Ali 7 ай бұрын
Thanks @CodeMaze for the video. Are you going to talk about cache stampede?
@CodeMaze
@CodeMaze 7 ай бұрын
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_Ali
@Tamer_Ali 6 ай бұрын
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)
@CodeMaze
@CodeMaze 6 ай бұрын
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_Ali
@Tamer_Ali 6 ай бұрын
@@CodeMaze I already read it 👍
@w1llow01
@w1llow01 5 ай бұрын
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?
@CodeMaze
@CodeMaze 5 ай бұрын
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.
@Mikewendwosen
@Mikewendwosen 5 ай бұрын
can you do Response cache using Marvin Cache Headers library its not clear on the book.
@CodeMaze
@CodeMaze 5 ай бұрын
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 :)
@ramasamynagappan7586
@ramasamynagappan7586 7 ай бұрын
Great
@CodeMaze
@CodeMaze 7 ай бұрын
Thanks.
@andresbeltran5779
@andresbeltran5779 5 ай бұрын
Excellent
@CodeMaze
@CodeMaze 5 ай бұрын
Thank you. Thanks for watching as well.
@Galal424
@Galal424 7 ай бұрын
You are the best person Thanks 🤍
@MarinkoSpasojevic
@MarinkoSpasojevic 7 ай бұрын
Thank you too for watching. Cheers.
What's New in .NET 9 with Examples
25:02
Nick Chapsas
Рет қаралды 54 М.
Introducing HybridCache in ASP.NET Core
22:39
dotnet
Рет қаралды 10 М.
Симбу закрыли дома?! 🔒 #симба #симбочка #арти
00:41
Симбочка Пимпочка
Рет қаралды 5 МЛН
Intro to In-Memory Caching in C#
33:56
IAmTimCorey
Рет қаралды 81 М.
Cache Invalidation Doesn't Have To Be Hard
12:47
Milan Jovanović
Рет қаралды 14 М.
Onion Architecture with .Net
20:24
MagwaiTech: Programming & Hacking with Abram
Рет қаралды 294
Caching in ASP.NET C# - Memory Caching is AMAZING
12:24
tutorialsEU - C#
Рет қаралды 25 М.
The Logging Everyone Should Be Using in .NET
15:34
Nick Chapsas
Рет қаралды 85 М.
Is Asp.NET Core Better than Node.js
13:35
Gavin Lon
Рет қаралды 9 М.
Adding a cache is not as simple as it may seem...
13:29
Dreams of Code
Рет қаралды 110 М.
What's new in .NET 9 and C# 13
19:21
Filip Ekberg
Рет қаралды 18 М.