Code Room
Code reviewMedium
Question
Review this Go in-memory cache used by HTTP handlers.
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
type Cache struct { data map[string][]byte} func NewCache() *Cache { return &Cache{data: map[string][]byte{}} } func (c *Cache) Get(k string) ([]byte, bool) { v, ok := c.data[k] return v, ok} func (c *Cache) Set(k string, v []byte) { c.data[k] = v}Run or narrate your approach, then ask the coach.