Decorator
Intent: Attach additional responsibilities to an object dynamically.
When to use it
- Adding behaviour without subclassing
- Combinable features (logging, caching)
Example
Wrapping an API client with retry and caching.
Intent: Attach additional responsibilities to an object dynamically.
Wrapping an API client with retry and caching.