Skip to main content
Xsphere
  • ပင်မ
  • ကျွန်ုပ်တို့၏ လက်ရာများ
  • ကျွန်ုပ်တို့အကြောင်း
  • ဘလော့ဂ်
  • အလုပ်လျှောက်ရန်
  • ဆက်သွယ်ရန်
Xsphere
  • ပင်မ
  • ကျွန်ုပ်တို့၏ လက်ရာများ
  • ကျွန်ုပ်တို့အကြောင်း
  • ဘလော့ဂ်
  • အလုပ်လျှောက်ရန်
  • ဆက်သွယ်ရန်

October 16, 2026 · 2 min read

What a Real-Time System Can Cache, and What It Must Not

Engineering
What a Real-Time System Can Cache, and What It Must Not

There is a reflex, when a real-time system is under load, to conclude that caching is not available because the data is live. That is true of some of the data and badly wrong about most of it.

Sorting your data by how fast it actually changes is one of the higher-leverage exercises available.

Never cache

Anything where serving a stale value produces a wrong outcome rather than an old one. Current driver positions. Whether a driver is available. Whether a ride has already been accepted.

Caching availability for even a few seconds means two riders can be offered the same driver. That is not a performance trade-off, it is a correctness failure wearing one.

Cache briefly

Values that change continuously but where small staleness is acceptable and the computation is expensive.

  • Route and travel-time estimates between common points, where traffic shifts over minutes rather than seconds.
  • Demand levels for a zone, which are inherently aggregate and smoothed.
  • Aggregate counts that drive operational dashboards.

Short time-to-live caching here removes a surprising amount of repeated work, because many requests ask about the same few places at the same time.

Cache aggressively

Reference data that changes on human timescales: geofence and zone definitions, pricing rules, vehicle categories, map tiles, service area boundaries.

This is the category teams most often leave uncached, because it sits next to live data and inherits an assumption of volatility it does not deserve. Zone boundaries change when someone in operations edits them, which is not often.

Cache per request

The cheapest and most overlooked layer: within the handling of a single request, do not fetch the same thing twice. A dispatch decision that looks up the same zone configuration for each candidate driver is doing identical work repeatedly for no reason.

This needs no infrastructure and no invalidation strategy, because the cache dies with the request.

Start with the question

For every piece of data: how wrong is a value that is thirty seconds old? If the answer is 'slightly out of date', cache it. If the answer is 'it produces an incorrect decision', do not. That single question resolves most cases without debate.

Share this article

Related articles

Why We Rebuilt Fary's Dispatch Engine in Go
Engineering

Why We Rebuilt Fary's Dispatch Engine in Go

Matching riders to drivers is a latency problem before it is an algorithms problem. Here is why we moved Fary's dispatch path to Go, and what we would do differently.

October 17, 2026 · 1 min read

Why FARY Is Moving from Cross-Platform to Native Mobile Development
Engineering

Why FARY Is Moving from Cross-Platform to Native Mobile Development

Ride-hailing apps depend on more than a shared codebase. Real-time location, background tracking, navigation, and platform-specific behavior are pushing FARY toward native mobile development.

October 16, 2026 · 2 min read

Streaming Driver Positions Instead of Polling for Them
Engineering

Streaming Driver Positions Instead of Polling for Them

Thousands of vehicles reporting location continuously. Why request-response is the wrong shape for that problem, and what changes when you stream.

October 16, 2026 · 1 min read

Xsphere Logo

ထုတ်ကုန်များ

  • Fary
  • Getbak

ကုမ္ပဏီ

  • ကျွန်ုပ်တို့အကြောင်း
  • ကူညီရေးလှုပ်ရှားမှုများ

အလုပ်အကိုင်

  • အလုပ်လျှောက်ရန်
  • သတင်းများ

သတင်းအချက်အလက်များ

  • နည်းပညာသတင်းအချက်အလက်များ
  • တခြားသတင်းများ

ဥပဒေ

  • ကိုယ်ရေးအချက်အလက် မူဝါဒ
  • စည်းမျဉ်းစည်းကမ်းများ
Fary Logoဒေါင်းလုပ်ဒ်ဆွဲနိုင်ပါပြီ။
Download Fary on App StoreDownload Fary on Play Store