API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
interfaceCachePolicyResolver
Chooses the CachePolicy for one acquisition, at the moment it starts. A route is configured with a policy or with a resolver. A resolver is for a decision that depends on something outside the route - connectivity, an application mode, a per-type rule - and is asked once per acquisition, never per record. Resolution happens at the START of an acquisition and never again: a request that was allowed to reach the network keeps that contract to completion. Only the NEXT acquisition sees a changed answer, which is what keeps a load from being re-routed mid-transfer by an event it never observed.
import { CachePolicyResolver } from '@codexo/exojs'Chooses the CachePolicy for one acquisition, at the moment it starts.
A route is configured with a policy or with a resolver. A resolver is for a decision that depends on something outside the route - connectivity, an application mode, a per-type rule - and is asked once per acquisition, never per record.
Resolution happens at the START of an acquisition and never again: a request that was allowed to reach the network keeps that contract to completion. Only the NEXT acquisition sees a changed answer, which is what keeps a load from being re-routed mid-transfer by an event it never observed.
policyFor(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…