Skip to main content

refresh

Function refresh 

Source
pub async fn refresh() -> bool
Expand description

Force-refresh the models.dev cache.

Performs a conditional GET (ETag) regardless of the mtime window. The result is written to the cache file. The in-memory catalog is not updated (OnceLock is immutable) — the refreshed data takes effect on the next process start.

Returns true if the cache was updated (200), false if unchanged (304) or on error.