---
title: "Template class"
canonical: https://isoplane.dev/docs/reference/sdk/Isoplane.Sdk/Isoplane/Template
---

# Template class

Lets an application prepare captured state ahead of requests, that every instance then starts with.

```csharp
public static class Template
```

## Public Members

| name                                                                                                             | description                                                                |
| ---------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------- |
| static event [Initializing](https://isoplane.dev/docs/reference/sdk/Isoplane.Sdk/Isoplane/Template/Initializing) | Raised after the application has started and before its template is saved. |

## Remarks

Isoplane initializes the application ahead of requests and saves its memory as a template. It then scales copies of the application with traffic, up to the application’s instance limit. Each copy is an instance and starts from the template. Captured startup work is reused rather than repeated in every instance. Subscribe to [`Initializing`](https://isoplane.dev/docs/reference/sdk/Isoplane.Sdk/Isoplane/Template/Initializing) to do that work: load reference data, build lookup tables, and run the code a request will run so that no request pays for its first use.

An application written without ASP.NET has no start-up code to subscribe from, and marks one method with [`TemplateInitializerAttribute`](https://isoplane.dev/docs/reference/sdk/Isoplane.Sdk/Isoplane/TemplateInitializerAttribute) instead. For state that must differ between instances, use [`Instance`](https://isoplane.dev/docs/reference/sdk/Isoplane.Sdk/Isoplane/Instance). [The application lifecycle](https://isoplane.dev/docs/concepts/application-lifecycle) explains templates and instances in full.

## See Also

- namespace [Isoplane](https://isoplane.dev/docs/reference/sdk/Isoplane.Sdk)
