Skip to main content

spawn_stale_while_revalidate

Function spawn_stale_while_revalidate 

Source
fn spawn_stale_while_revalidate(
    context: &FetchContext,
    http_request: &Request,
    revalidation_guard: Arc<AtomicBool>,
)
Expand description

The cached (stale) response has already been returned to the caller; here we fire off an independent fetch whose only purpose is to refresh the stored response.