> For the complete documentation index, see [llms.txt](https://ngxf.gitbook.io/platform/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ngxf.gitbook.io/platform/features/keep-alive.md).

# Keep Alive

The keep alive directive will caches your view and re-uses it when needed.&#x20;

## Cache Input

An example in `COMPONENT.template.html`.

```markup
<input *keepAlive>
```

## Cache Div

An example in `COMPONENT.template.html`.

```markup
<div *keepAlive>
  <input>
</div>
```

�
