Skip to main content

Module image_prefetch

Module image_prefetch 

Source
Expand description

Host-side remote image prefetch for WidgetKit / desktop store writes. Prefetch remote image.url into data: URIs for hosts that cannot fetch (WidgetKit). Android keeps its own localPath pipeline — Rust prefetch is a no-op there so we do not inflate SharedPreferences / Binder with base64.

Behind the image-prefetch feature (ureq). In-memory + disk cache by URL with TTL so startWidgetUpdater does not hit the network every tick. The command path only reads the cache; network fetches run on a background thread so a slow host cannot stall set_widget_config. Successful prefetch keeps url so Android / Adaptive Cards can still use it.

Functions§

prefetch_remote_images
Walk the config and fill image.data from http(s) URLs when needed.