25/35
Part 3 of 3 · Serving and driftLearn and do

Cache by tier, and count the cache in the feature's age

A cache cuts the fetch time, and it makes each value older.

FeatureChangesCacheExtra age it adds
Title featureswhen the catalog snapshot refreshesin process, refreshed every 5 minutesup to 5 minutes
Member batch featuresonce a dayper session, TTL 30 minutesup to 30 minutes, on a value already 4 to 28 hours old
Member streaming featuresevery few secondsnone, or a TTL well under the freshness targeta 10-minute TTL makes a 1-minute feature a 10-minute feature

Set each TTL from how often the value changes.

The session cache pays off. Say one homepage session makes 6 ranking calls (assume: the first rows plus pagination). Reading member batch features once per session instead of once per call removes 5 reads in 6, about 83%.

In the editor, write worst_age_s(pipeline_lag_s, cache_ttl_s) and reads_saved(calls_per_session). The last line checks the 10-second stream behind a 15-minute cache, and the 6-call session.