## CreateEnvironmentCache

### Introduced

v4.0

### Description

Creates a cache source for the specified environment. The cache source is an ActionSource used to cache the simulation data.

### Scripting Syntax

    oReturn = CreateEnvironmentCache( Model, [Environment] );

### Return Value

Returns the new cache source as an ActionSource.

### Parameters

Parameter | Type | Description
--- | --- | ---
Model | Model | Specifies the environment for which the cache is created. If the environment is not specified then the current environment is used. If there is no current environment then the task does nothing.
Environment | SimulationEnvironment | Specifies the environment for which the cache is created. If the environment is not specified then the current environment is used. If there is no current environment then the task does nothing.