backgroundRefresh static method
Cache policy for items that should be refreshed in the background when stale.
Implementation
static CachePolicy backgroundRefresh({
Duration staleTime = const Duration(minutes: 5),
Duration expiry = const Duration(days: 1),
}) {
return CachePolicy(
staleTime: staleTime,
expiry: expiry,
refreshStrategy: RefreshStrategy.backgroundRefresh,
);
}