runWith<T> static method
Runs body with sessionId/cacheRetention overriding the cache
routing of provider calls started inside it. An override is explicit:
code that binds default routing values (the model-roles resolver)
yields to an active override instead of replacing it.
Implementation
static T runWith<T>(
T Function() body, {
String? sessionId,
String? cacheRetention,
}) {
return runZoned(
body,
zoneValues: {
_zoneKey: (sessionId: sessionId, cacheRetention: cacheRetention),
},
);
}