Design patterns·Wrapping and composing
you wrapped the same interface in retries, then logging, then caching, and the caller still sees one thing.
Decorator pattern
Also calleddecorator, wrapper with behaviour
A wrapper that implements the very same interface as the object it wraps, adding behaviour before or after delegating. Because the interface is unchanged it stacks: three decorators around one object is still that one interface, which is what separates it from adapter and facade. Order matters and is easy to get wrong — caching outside retries caches the eventual success, caching inside retries caches the failure — and that is nearly always the bug.