Decorator Pattern using the example of a cached repository
The decorator pattern is a common pattern in object oriented languages. It allows us to add behavior to an individual object without changing the object itself.
We will exactly that with a repository. We introduce a caching layer via the decorator pattern.