Code Room
Code reviewMedium
Question
Review this Python on-disk-blob cache wrapper.
What a strong answer looks like
Separate real bugs from style. Rank issues by severity, point at the root cause rather than the symptom, and suggest a concrete fix — specific and kind.
Learn the concepts
class ThumbnailCache: def __init__(self): self._cache = {} # image_id -> bytes def get(self, image_id, render): if image_id in self._cache: return self._cache[image_id] data = render(image_id) # decodes + resizes, ~200KB-2MB each self._cache[image_id] = data return dataRun or narrate your approach, then ask the coach.