Copilot suggests caching to improve a slow endpoint, but the endpoint returns user-specific data and has strict freshness requirements. What should the developer do before adopting the suggestion?

Published
  1. Profile the bottleneck and evaluate cache keys, isolation, invalidation, and freshness against the requirements.
  2. Add a single global cache entry for the endpoint because it has the lowest overhead.
  3. Accept the cache if Copilot estimates a large percentage improvement.
  4. Remove the freshness tests so the optimization can be compared only on response time.

Comments — 0