Skip to main content

invalidate_cache_on_generation_change

Function invalidate_cache_on_generation_change 

Source
async fn invalidate_cache_on_generation_change(
    db: &Arc<RusqliteService>,
    server_id: &str,
    generation: ServerGeneration,
) -> bool
Expand description

Drop the cached catalog if the server changed generation since we last looked.

Returns whether anything was invalidated, which is what the tests assert on.

The first run after this feature ships records the generation and invalidates nothing: a NULL column means “never recorded”, not “changed”. Making the absence of information trigger a full re-fetch would charge every existing user bandwidth for a server upgrade that has not happened.

TRACES: UR-085 | DR-284