pub enum FetchRequest {
Fresh,
FreshNoCache,
Conditional(Box<Parts>),
}Expand description
Describes the type of fetch to perform when the streaming cache orchestrator needs to make a network request.
The streaming run method accepts a callback FnOnce(FetchRequest) -> Fut
rather than an impl Middleware, so this enum tells the caller whether to
issue a fresh request or a conditional (revalidation) request.
Variants§
Fresh
A fresh fetch (cache miss or forced).
FreshNoCache
A fresh fetch where the caller should add cache-control: no-cache
to the outgoing request. Used for CacheMode::NoCache to signal
upstream caches that they must revalidate.
Conditional(Box<Parts>)
A conditional fetch for revalidation. The contained
request::Parts carry the conditional headers (e.g.
If-None-Match, If-Modified-Since) that should be merged into
the outgoing request before sending it. Callers should replace
existing headers of the same name (insert, not append).