StaleTime.dynamic constructor
Computed per query, from its current state (TanStack Query:
staleTime: (query) => …).
Asked every time staleness is decided, which is several times per
operation, and not a number worth relying on. Keep compute cheap and
free of side effects; it is a question about the query, not a place to
do work.
Implementation
const factory StaleTime.dynamic(
StaleTime Function(Query<Object?> query) compute) = StaleTimeDynamic;