https://refactoring.guru/design-patterns/flyweight
- Flyweight is a structural design pattern that lets you fit more objects into the available amount of RAM by sharing common parts of state between multiple objects instead of keeping all of the data in each object.
- A fine-grained instance used for efficient sharing. Also known as: Cache
- Use the Flyweight pattern only when your program must support a huge number of objects which barely fit into available RAM.
https://refactoring.guru/design-patterns/flyweight#checklist
python main.py
python example.py