Problem Statement
Choose Decorator when you need to:
Explanation
Decorator wraps an object to add cross-cutting behavior like caching, logging, or rate limiting. You stack them flexibly.
It follows open–closed: extend behavior without touching the wrapped type.
Code Solution
SolutionRead Only
CacheRepo = new CachingDecorator(new SqlRepo());
