API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
classConnectivityPolicyResolver
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.
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.
new(options: ConnectivityPolicyResolverOptionsConstruction options for a ConnectivityPolicyResolver.): ConnectivityPolicyResolverpolicyFor(context: CachePolicyResolutionContextWhat a CachePolicyResolver is told about the acquisition it is choosing a policy for.): CachePolicyDecides in which order a cache and the network are consulted for one acquisition. This is the extension point for custom caching behaviour. Implementations are…