AAAli Asghar
← All insights

7 November 2026 · 4 min read

How a cache gate cut 96% of the work in a scheduled pipeline

A daily pipeline re-checked thousands of records that had not changed. A cache gate and a seven-day expiry removed 96% of the compute.

A scheduled pipeline looked up competitor data for every product in a large catalogue, every run. Each lookup cost time and paid API calls. Almost none of the answers changed from one day to the next.

The pattern: only do work when something could have changed

  • Store each result with the time it was fetched
  • Before doing the expensive lookup, check the store. If a result exists and is younger than the expiry window, skip the lookup
  • Pick the expiry from how fast the data really changes. Seven days fitted here
  • Write results with a stable unique key so re-runs update the existing row instead of adding duplicates

That last point mattered more than expected. The original store used keys that did not match between runs, so the cache never hit and the table kept growing. Fixing the keys was what made the gate actually work.

The result

About 96% of the lookups were skipped on a normal run, with the same output. Runs finished faster, API costs fell with them, and the pipeline stopped competing with other workflows for server time.

If an automation bill keeps rising, the first question is not which plan to buy. It is how much of the work being paid for produces a different answer from last time.

Seeing this in your own workflows?

Send a note with the tools involved and what you are seeing.

Email me