requests: 0 disk loads: 0
client โ†’ proxy โ†’ real image ยท same interface: display()
๐Ÿ‘ค
CLIENT
calls display()
โžœ
โšก
๐Ÿชž
PROXY
ImageProxy ยท cache
p1 p2 p3
from cache
โžœ
๐Ÿ’พ
REAL IMAGE
RealImage ยท 5 MB on disk
๐Ÿ–ผ
loaded 5 MB
Proxy โ€” a stand-in with the same interface
Click a photo โ€” the proxy decides whether the disk is touched.
โ–ธ Click the same photo twice โ€” watch which chip moves.