New series: what assistive tech really hears on your checkout page. Start with part one →
Shipwright
Home
Performance Sep 18, 2026 2 min read 136 views

Your Cache Hit Ratio Is Lying to You

Priya Raman

Priya Raman

Database and performance engineer. Priya reads…

Share

A 98 percent hit ratio can still hide your slowest requests. Here is what to measure instead. Performance work goes wrong when it starts with a guess. Every change in this post began with a measurement on real hardware and ended with a second measurement to prove it helped.

Cover illustration for the article Your Cache Hit Ratio Is Lying to You
Figure 1. A 98 percent hit ratio can still hide your slowest requests. Here is what to measure instead.

Measure before you touch anything

Field data from real users tells you where the problem is; lab tools tell you why. We start with the Core Web Vitals report, pick the worst page template, and only then open the profiler.

  • Start from field data, not a lab score.
  • Fix the largest resource first.
  • Compare percentiles, not single runs.
  • Re-measure a week later.

The change that mattered

The biggest single win was rarely clever. Right-sized images, fewer third-party scripts, and a cache header on static assets did more than any amount of micro-optimisation in our own code.

Any fool can write code that a computer can understand. Good programmers write code that humans can understand.

Martin Fowler, Refactoring, 1999

Quick takeaway

Measure, change one thing, measure again.

Verifying the win

📏

Field data

Real users on real devices.

🖼️

Right-sized media

Serve the pixels the layout needs.

🗃️

Caching

Long cache lifetimes for fingerprinted assets.

After each change we compare the median and the 75th percentile, not the best run. A fix that only helps fast devices is not a fix for the people who were actually suffering.

If you try this on your own project, start with one page or one service rather than the whole codebase. A small experiment gives you real numbers to argue with, and it is easy to roll back if the idea does not fit.

We have been running this approach for several months now. The initial setup took about a day, and the ongoing cost is close to zero once the team knows where to look.

None of this is new, and that is the point. The techniques that last are usually the boring ones that are documented well and supported by the platform itself.

As always, the examples are simplified to fit on a page. The production version has more error handling and logging, but the shape of the code is the same.

Wrapping up

As always, the examples are simplified to fit on a page. The production version has more error handling and logging, but the shape of the code is the same.

Priya Raman

Priya Raman

Author

Database and performance engineer. Priya reads query plans for fun and believes every slow page has a story worth measuring.

Related Posts

Comments 5

Kofi Mensah

Thanks for including the numbers. So many posts skip the measurement part.

Priya Raman Author

Thanks for catching that, it is fixed now.

Yuki Tanaka

+1, this matches what we saw after the migration.

Sam Whitfield Member

Thanks for catching that, it is fixed now.

Fatima Zahra

Bookmarked. The code sample alone saved me an afternoon.

Leave a comment

Your email will not be published. Sign in for a faster experience.

Supports **bold**, *italic*, and `code`.