Extremely FAST Caching Repository With Decorator Pattern in ASP.NET Core

preview_player
Показать описание

In this video, I will show you how to use the decorator pattern to create a caching repository implementation. The decorator pattern allows us to introduce new behavior to an existing class without modifying the class. We'll use the repository implementation and, with the decorator pattern, create a caching version to extend it.

Join my weekly .NET newsletter:

Decorator Pattern In ASP.NET Core

Subscribe for more:

Chapters
0:00 What we're building
1:11 Current repository implementation
2:26 Caching repository with the Decorator pattern
6:37 Configuring Decorator with ASP.NET DI
7:36 Caching repository in action
11:25 Configuring Decorator with Scrutor
Рекомендации по теме
Комментарии
Автор

I already knew this pattern, because of Steve Ardalis, and let me tell you, i used this in a software project, from the company i work at, and it didn't cost almost any time, simply fantastic

filipeencarnacao
Автор

Thanks Milan,
Please keep in mind that using a DISTRIBUTED cache is required in order for your service to be scalable.
Otherwise, different instances of the same service will not be aware of each other’s in memory cache.
Great video!

Jbobonline
Автор

Milan, I like the way your videos have detail and they're not too long either. The simplicity of your explanations have made me want to implement most of things you explain on your videos. Your presentations aren't too fast and not too slow, so it makes it easy to understand. Thank you for your time

musacj
Автор

Great work. As always clearly presented in the simplest form, but covering the essence of the subject.

radeksendecki
Автор

Awesome video, I really like the way you explain things 😊

milicabozic
Автор

Very clean design for caching queries on repositories. I already have in mind a few queries of my project to implement the pattern this way. Thanks Milan!

sergiom.
Автор

Really nice stuff man, well explained, well presented...quality content, keep it up!

yunietpiloto
Автор

Thanks, Milan, excellent implementation of the decorator pattern.

adiazwise
Автор

I use the same pattern, its great. One thing I like to add is to have any Update/Delete method to clear (or update) the cache.

PelFox
Автор

Awesome loving your videos! so happy I stumbled upon your page

shanemonck
Автор

Found your channel a few days ago. You are doing a magnificent job. The implementation details, like the options for registering services in DI, are fantastic!

lucek
Автор

I thought I'd seen you make a video on this -- and just what I needed. Brilliant, to the point as always. Thanks!

andersjuul
Автор

Fantastic video, well explained. I have used Scrutor and the way that works is so good because under the hood it uses the built-in ASP .NET Core DI container.

I guess that caching behavior can also be done using the new Output caching middleware built-in .NET 7.
Great video!

camilotorresc.
Автор

Neat and tidy ! It's great you have shown few ways for service registration.

miodragsimunovic
Автор

Awesome contents! Thanks for sharing

NAELSLR
Автор

Very Nice explanation!!!! TKS for show many ways to do that!

beirinhaaa
Автор

I was really thinking about doing something like this but had no idea how to do it(1st year on software dev uni so don't know quite a lot). Thanks for the video.

kydlnw
Автор

That Scrutor implementation seems more flexible which is really cool.

tedchirvasiu
Автор

Well done, comprehensive and straighforward as always in your videos. Besides, one should consider using ValueTask instead of Task in such cases.

krccmsitp
Автор

I always watch your videos. They've really helped me a lot in growing professionally in my job. Honestly, I would pay to watch your videos with subtitles correctly translated into Spanish instead of the automatic YouTube ones that often don't work well or translate incorrectly.

samuelterrazas