Definition
Freshness Inheritance is a cache-invalidation model in which a cached query result inherits its freshness — and therefore its staleness — from the source tables in its lineage, rather than from a fixed time-to-live (TTL).
In one sentence: a cached query is exactly as fresh as the freshest-required of its source tables — one heartbeat invalidates every query that depends on it.
The Problem with TTL Caching
The classic result cache picks a time-to-live and hopes. Both directions fail:
- TTL too short: you re-run expensive queries that are still perfectly valid, paying for compute you didn't need.
- TTL too long: you serve stale numbers after the underlying data has already changed — the silent correctness bug that erodes trust in a dashboard.
There is no single TTL that is right, because freshness is not a property of time — it is a property of whether the source data changed.
How Freshness Inheritance Works
Each source table emits a freshness heartbeat that advances whenever its data changes. Every cached query records the lineage of source tables it was computed from. When any table in that lineage advances its heartbeat, every cached query depending on it is invalidated automatically. The consequence:
- Caches never serve stale results — invalidation is driven by real data changes, not a guessed expiry.
- Caches are not needlessly evicted — a query stays valid as long as none of its sources have changed.
TTL Cache vs Freshness Inheritance
| Property | Fixed TTL cache | Freshness Inheritance |
|---|---|---|
| Invalidation trigger | Clock expiry | Source-table change (heartbeat) |
| Risk of stale results | Yes, until TTL expires | No |
| Needless re-computation | Yes, on every expiry | No, only when sources change |
| Tuning required | Per-query TTL guesswork | None — driven by lineage |
| Cascade on upstream change | Manual / none | Automatic to all dependents |
Related OrionBelt Concepts
- Semantic Sidecar — Freshness Inheritance is part of the OBSL result cache that serves every consumer through one governed API.
- Composite Fact Layer (CFL) — compiled multi-fact queries are cached with the same lineage-driven freshness as any other query.
- Glossary — all coined terms in one place.
Frequently Asked Questions
What is Freshness Inheritance?
A cache-invalidation model in which a cached query result inherits its freshness — and therefore its staleness — from the source tables in its lineage, rather than from a fixed TTL. When a source table changes, every cached query that depends on it is invalidated automatically.
How is it different from a TTL cache?
A TTL cache guesses an expiry and hopes. Freshness Inheritance is driven by real data changes: a query stays valid as long as none of its source tables have changed, and is invalidated the moment one does.
What is a freshness heartbeat?
Each source table emits a freshness heartbeat that advances when its data changes. Any cached query whose lineage includes that table watches the heartbeat; when it advances, the query is invalidated. One upstream change cascades to every dependent query.
Who coined the term Freshness Inheritance?
Freshness Inheritance was coined by Ralf Becher (RALFORION) and is implemented in the result cache of the open-source OrionBelt Semantic Layer (OBSL).