# maxBlocksInCache

Maximum cached blocks in the infinite row model. Balances memory use against repeat queries.

Canonical: https://grid.syidax.com/docs/options/maxBlocksInCache/

<a id="meaning"></a>

## What does this API do?

Maximum cached blocks in the infinite row model. Balances memory use against repeat queries.

<a id="contract"></a>

## Exact input and result types

```typescript
maxBlocksInCache: number
```

| Item | Value |
| --- | --- |
| JavaScript name | maxBlocksInCache |
| HTML attribute | max-blocks-in-cache |
| Default | undefined |
| Input type | number |

<a id="usage"></a>

## Usage flow

Set this on a property of the Grid element. In HTML, you can also use the max-blocks-in-cache attribute. Pass arrays, objects, and callbacks through JavaScript, and use new arrays or objects when applying changes.

<a id="recipes"></a>

## Feature explanations and examples

- [Request only needed blocks](https://grid.syidax.com/docs/features/infinite-row-model.md) — When downloading every order at once is impractical, request only the ranges needed for scrolling. datasource supplies data based on starting and ending rows and search conditions.
