API reference

Every public class, method, and event in @codexo/exojs. Generated from source.

C

classConnectivityPolicyResolver

@codexo/exojs / assets / stable

Routes acquisitions through the cache alone whenever the application is not allowed to reach the network, and through the configured online policy whenever it is. It holds no connectivity of its own. The decision is made from the CachePolicyResolutionContext.network snapshot the loader hands it per acquisition, which is what lets one resolver - and one `AssetCache` - be shared between applications that disagree about whether they may use the network. `allowsNetwork` already folds both halves of the question together - the environment's hint and the application's own mode - so this never has to know which one said no. `'unknown'` counts as allowed: the host is not claiming the network is gone, and refusing on no evidence would break every environment that reports nothing.

0
props
1
methods
0
events
Import
import { ConnectivityPolicyResolver } from '@codexo/exojs'

Routes acquisitions through the cache alone whenever the application is not allowed to reach the network, and through the configured online policy whenever it is.

It holds no connectivity of its own. The decision is made from the CachePolicyResolutionContext.network snapshot the loader hands it per acquisition, which is what lets one resolver - and one `AssetCache` - be shared between applications that disagree about whether they may use the network.

`allowsNetwork` already folds both halves of the question together - the environment's hint and the application's own mode - so this never has to know which one said no. `'unknown'` counts as allowed: the host is not claiming the network is gone, and refusing on no evidence would break every environment that reports nothing.

Constructors1
Methods1
The policy this acquisition runs under. Named apart from CachePolicy.resolve on purpose: the two are accepted in the same position, and one method name meaning "run the acquisition" on one and "pick who runs it" on the other would make the union undiscriminable and the mistake silent.
Source