API reference

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

I

interfaceCachePolicyResolver

@codexo/exojs / assets / stable

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.

0
props
1
methods
0
events
Import
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.

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