# prefetch

Evaluates an atom factory and stores its result in the supplied registry before a component reads
it.

## Import

```ts
import { prefetch } from "@ensforge/react/cache";
import { getOwnerAtom } from "@ensforge/react/atoms";
```

## Usage

```ts
const owner = await prefetch(
  registry,
  sdk,
  getOwnerAtom,
  { name: "example.eth" },
  { idleTTL: "5 minutes" },
);
```

## Parameters

Accepts the registry, SDK, atom factory, action parameters, optional `EnsAtomOptions`, and optional
Effect run options.

## Return Type

`Promise<Success>`

## Effect

Use [`prefetchEffect`](./prefetch-effect) to keep the operation inside an Effect program.
