Skip to main content

Template class

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

public static class Template

Public Members​

namedescription
static event InitializingRaised 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 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 instead. For state that must differ between instances, use Instance. The application lifecycle explains templates and instances in full.

See Also​