All jobs / Backend developer / Performance

Backend developer interview question · 1–3 years

The interviewer asks: “You add Cache-Control to a JSON API. What do you watch for?” Strongest answer?

The strongest answer

Authenticated or user-specific responses get private (or no-store). public + a CDN will leak another user's body. I set a max-age I can live with, and I use ETags when I need revalidation.

Why it works

Exactly. Shared caches are the danger. private / no-store for personal data; public only for truly public, versioned representations.

What a good answer covers

Answers that fall short

Who gets asked this

More Performance questions