# Decorator: Same Phone, More Features

SkyCast is slow and counts every call, so the hub needs today's weather remembered and every ask logged; subclasses for each combination (cached, logged, cached and logged) multiply with every feature, while decorators wrap the weather source in small layers that keep its interface, so features stack in any order without changing SkyCast.

![Cheat sheet: Decorator: Same Phone, More Features](https://fsdtrainingmedia.blob.core.windows.net/public/images/2026/11/c30cc94ad71c4270ac0567e953958d01.webp)

- Category: Data Structures
- Level: Journeyman
- Tags: Cache, Composition, Decorator Pattern, OOP, Open/Closed Principle
- Author: Gregor Dzierzon
- Updated: November 17, 2026

Source: https://www.ask-codey.com/cheat-sheets/dp-decorator-cheat-sheet
