Hmm... What do you mean by "output caching"? The term "output caching" applies, for example, to web pages _dynamically_generated_ on the webserver. But there is nothing being generated here. So, it is just caching. Returned value IS the output value!
No, it is not a better option - at least not yet. I have tried to use it in my current project, but I had to abandon this path. It's missing essential features for an L1-L2 cache, (like the backplane) and the API lacks some that would cost nothing to add, like a simple "get." No wonder it is still in preview after .NET 9 was released a while ago. However, it had its impact already: with the push from the good ideas in it (the flags and the tagging), for example, the author of FusionCache improved his library by adding those (check out the preview version). Maybe others will follow suit.
@@деменция-н4п i got it, so you said if in other thread i changed the data i need to add an extra logic to mark that cached information as old o removed it?
That's why you configure cache expiration. Data is served from the cache until it expires or becomes invalidated. Once the cache expires, the updated data can be retrieved. If you want to see changes to your data immediately, you would need to check the server every time. However, doing so defeats the purpose of using the cache-aside pattern.
There are multiple strategies for invalidating the cache. None of them is ideal - each one has their own pros and cons. The simplest ones are manual invalidation and time-based invalidation. More advanced are based on some sort of an external agent monitoring and updating the values.
Want to master Clean Architecture? Go here: bit.ly/3PupkOJ
Want to unlock Modular Monoliths? Go here: bit.ly/3SXlzSt
That is a big improvement on IM and ID
You're really good at this, great video.
Thank you very much!
Great content Milan, thanks! 🙏
So is SlidingExpiration officially not part of the HybridCacheOptions?
really love this one ❤
it would be helpful a video how to use hybrid cache as a caching behavior in Mediator Pipeline behavior in Clean Architecture.
That's a great idea for a future video!
Really interesting 🤔 Have to investigate this more. The hybrid version indeed seems to be really useful.
Yeah it's awesome
Nice video. Could you please show us how to do this for output caching and how to invalidate it
Ok I will try
Hmm... What do you mean by "output caching"? The term "output caching" applies, for example, to web pages _dynamically_generated_ on the webserver. But there is nothing being generated here. So, it is just caching. Returned value IS the output value!
is it worht learning .net core in 2025 for a 20 yr old in a long run will it be best choice or java spring boot ?
Yes, definitely
Java is older than C#/.NET. And Python is even older still.
No, it is not a better option - at least not yet. I have tried to use it in my current project, but I had to abandon this path. It's missing essential features for an L1-L2 cache, (like the backplane) and the API lacks some that would cost nothing to add, like a simple "get." No wonder it is still in preview after .NET 9 was released a while ago. However, it had its impact already: with the push from the good ideas in it (the flags and the tagging), for example, the author of FusionCache improved his library by adding those (check out the preview version). Maybe others will follow suit.
I had always an issue with the cache and is how do you know if the data has changed or not?
when you change the data you'll know that data changes)
@@деменция-н4п i got it, so you said if in other thread i changed the data i need to add an extra logic to mark that cached information as old o removed it?
That's why you configure cache expiration. Data is served from the cache until it expires or becomes invalidated. Once the cache expires, the updated data can be retrieved. If you want to see changes to your data immediately, you would need to check the server every time. However, doing so defeats the purpose of using the cache-aside pattern.
Clear the cache when making the update (simplest solution)
There are multiple strategies for invalidating the cache. None of them is ideal - each one has their own pros and cons. The simplest ones are manual invalidation and time-based invalidation. More advanced are based on some sort of an external agent monitoring and updating the values.
Best Tutorial!
Wow, thanks!