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.
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?
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.
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)
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.
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 :)
Thank you all for watching and for your support.
►► If you want to check out all our courses you can do that here: courses.code-maze.com/courses/
Thanks a lot @CodeMaze for talking about Cache Stampede using SemaphoreSlim in In-Memory Caching. I was looking for that topic
Glad it was helpful! Thank you for watching the video.
Awesome demo
Thank you. Thanks for watching the video.
Thank you for this video, crazy that it was just created yesterday😂. Right timing for me I guess
You are most welcome. Thank you too for watching the video. As many would say, there is no wrong time for good stuff :)
You are a great tutor
I appreciate that! Thank you.
Good one !!!
Thank you! Cheers!
Thanks @CodeMaze for the video.
Are you going to talk about cache stampede?
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.
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?
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.
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)
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.
@@CodeMaze I already read it 👍
can you do Response cache using Marvin Cache Headers library its not clear on the book.
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 :)
Great
Thanks.
Excellent
Thank you. Thanks for watching as well.
You are the best person
Thanks 🤍
Thank you too for watching. Cheers.