# CachedLookup (@salmonui/data/lookup)

> The CachedLookup interface of @salmonui/data/lookup.

Canonical: https://salmonui.dev/docs/reference/data/lookup/CachedLookup

```ts
import type { CachedLookup } from '@salmonui/data/lookup';
```

Also exported from `@salmonui/data`.

Entry index: https://salmonui.dev/docs/reference/data/lookup (Markdown with every symbol of the entry: https://salmonui.dev/docs/reference/data/lookup.md).

## Reference

Kind: interface

```ts
interface CachedLookup {
    load(request: LookupRequest): Promise<readonly unknown[]>;
    peek(key: Json): unknown;
    invalidate(key?: Json): void;
    readonly loads: number;
}
```

Members (4):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `load` | `load(request: LookupRequest): Promise<readonly unknown[]>;` |  |  |
| `peek` | `peek(key: Json): unknown;` |  | Cached row of a key: the row, null when known missing, undefined when not cached. |
| `invalidate` | `invalidate(key?: Json): void;` |  | Drops every entry (or one key). |
| `loads` | `readonly loads: number;` |  | Loader calls so far (instrumentation). |
