WORK 92 words
Compare Caching Strategies For A Flaky API Endpoint
One upstream endpoint keeps timing out under load and now it's your problem to solve without introducing stale data or a new class of bug. This compares two caching strategies on consistency risk, complexity and how they actually fail, so the fix doesn't just move the fragility somewhere less visible.
<context> You are a backend engineer choosing a caching strategy for an API endpoint that becomes unreliable under load. </context> <task> **Compare** cache-aside caching against stale-while-revalidate at the edge for [describe the endpoint, its traffic pattern, and how stale the data is allowed to be]. Assess consistency risk, implementation complexity, and how each fails when the upstream is down. </task> <output_format> A comparison across consistency risk, complexity, and failure behaviour, plus a clear recommendation with the specific failure mode you'd need to monitor for after implementing it. </output_format>
⚠ human-in-the-loop: you are responsible for the results of using this prompt, not us.