More DI: Adding a Client-Side Cache with the Decorator Pattern

added by DotNetKicks
1/15/2019 2:03:42 PM

1 Kicks, 456 Views

The Decorator Pattern lets us add functionality without changing existing classes. Previously, we looked at adding retry functionality and exception logging to a data reader by using decorators. This time, we'll add a client-side cache to our data reader. (For more details on how the Decorator Pattern works, see the prior article More DI: Adding Retry with the Decorator Pattern.)