# KeyedFetchMixin

Auto-generated from the @jbrowse/mobx-state-tree model in the source. See the [developer guide](https://jbrowse.org/jb2/docs/developer_guide/) for concepts. Built into JBrowse core. [View source](https://github.com/GMOD/jbrowse-components/blob/main/packages/display-kit/src/KeyedFetchMixin.ts).

`FetchMixin` plus the freshness compare a single-payload fetch runs: the key
the view, settings and adapter call for (`currentFetchKey`) against the key
the held data was committed under (`loadedFetchKey`). Composed by
`GlobalFetchMixin` and `ComparativeFetchMixin` (ADR-105).

Each section ends with the members a composed model contributes, linked to the page that documents them.

## Volatiles

| Member | Description |
| --- | --- |
| **loadedFetchKey**<br><code>FetchKey &#124; undefined</code> | `currentFetchKey` as it stood when the held data was committed. Written only by `commitFetchResult` and cleared by `reload`; the data itself is the display's and stays on screen under the overlay. |

9 inherited volatiles from one model:

From [FetchMixin](../fetchmixin): [`activeSignal`](../fetchmixin#volatile-activesignal), [`fetchGeneration`](../fetchmixin#volatile-fetchgeneration), [`reloadCounter`](../fetchmixin#volatile-reloadcounter), [`statusWindow`](../fetchmixin#volatile-statuswindow), [`error`](../fetchmixin#volatile-error), [`statusMessage`](../fetchmixin#volatile-statusmessage), [`statusProgress`](../fetchmixin#volatile-statusprogress), [`fetchCanceled`](../fetchmixin#volatile-fetchcanceled), [`fetchRotation`](../fetchmixin#volatile-fetchrotation)


## Getters

| Member | Description |
| --- | --- |
| **viewSignature**<br><code>string &#124; undefined</code> | Overridable hook, the freshness input a display supplies: what the current view calls for, such as its block set (`blockKeySignature`) plus any view-derived tier like HiC's bin size. Leave settings out; `currentFetchKey` pairs this with `settingsFetchInputs`. `undefined` holds the fetch off, and is the default, so a missing override hangs rather than draws stale data. |
| **dataSuperseded**<br><code>boolean</code> | Overridable hook (default false): the held data matches the key but the screen will settle on different data, as when a dependent fetch is still out. A term of `dataCurrent` only, so it holds the export and never refetches; state only what a later commit is sure to clear. See `MultiRegionDisplayMixin.dataSuperseded`. |
| **currentFetchKey**<br><code>FetchKey &#124; undefined</code> | The key of the fetch the current view, settings and adapter call for: captured at issue and stamped at commit. Its identity survives a recomputation onto equal content. |
| **dataCurrent**<br><code>boolean</code> | The held data was committed for the current key and the display is not about to supersede it. For readers outside the fetch, the export gate above all; the fetch autorun makes the same compare inside `installFetch`, where a reload can override it. |

6 inherited getters from one model:

From [FetchMixin](../fetchmixin): [`isLoading`](../fetchmixin#getter-isloading), [`isLoadingOrCanceled`](../fetchmixin#getter-isloadingorcanceled), [`fetchInert`](../fetchmixin#getter-fetchinert), [`awaitingPrerequisite`](../fetchmixin#getter-awaitingprerequisite), [`awaitingDependentData`](../fetchmixin#getter-awaitingdependentdata), [`settingsFetchInputs`](../fetchmixin#getter-settingsfetchinputs)


## Actions

| Member | Description |
| --- | --- |
| **commitFetchResult**<br><code>(commit: () =&gt; void, key: FetchKey) =&gt; void</code> | The commit half of a keyed fetch: the display's store and the key stamp in one transaction, so no observer sees fresh data under a stale key or the reverse. |
| **reload**<br><code>() =&gt; void</code> | `FetchMixin.reload`, whose counter bump overrides the skeleton's freshness gate, plus dropping the loaded key so an export started after the click waits for the refetch. The data stays on screen. |

10 inherited actions from one model:

From [FetchMixin](../fetchmixin): [`setError`](../fetchmixin#action-seterror), [`setStatusMessage`](../fetchmixin#action-setstatusmessage), [`stopActiveFetch`](../fetchmixin#action-stopactivefetch), [`openStatusStream`](../fetchmixin#action-openstatusstream), [`cancelFetch`](../fetchmixin#action-cancelfetch), [`cancelFetchByUser`](../fetchmixin#action-cancelfetchbyuser), [`beforeDestroy`](../fetchmixin#action-beforedestroy), [`beginFetch`](../fetchmixin#action-beginfetch), [`endFetch`](../fetchmixin#action-endfetch), [`runFetch`](../fetchmixin#action-runfetch)


