has_current_data_model

Function has_current_data_model 

Source
pub(crate) async fn has_current_data_model(
    cache: &DiskCache,
    cache_key: &str,
    entities: DataModelEntities,
) -> bool
Expand description

Whether a data model at the CURRENT payload version is cached for cache_key.

Geometry and the data model are versioned separately, so a geometry entry outlives a data-model bump. Every geometry short-circuit must ask this before returning early: without it a deployment holding pre-bump entries reports a geometry hit, the client skips the upload (or the replay path skips the parse), nothing ever writes the current data-model key, and fetchDataModel polls a key nobody writes until it times out — geometry on screen with no properties and no error (issue #3869). Answering false costs one re-parse and rewrites both entries.

A cache read error answers false: re-parsing is the safe direction.

Asks about the entities VARIANT the request selects (#6034): a replay that skips the parse must not strand a client polling for the rooted table when only the full one was ever written, or the reverse.