Main Content

Store cached compilation artifacts on disk

Option to specify whether to store cached compilation artifacts on disk or in memory

Since R2024b

Model Configuration Pane: Simscape

Description

One of the optimization techniques for speeding up compilation of large models is memory caching for model compilation artifacts. However, memory caching does not persist between MATLAB® sessions. Therefore, when you start a new MATLAB session, the first compilation of a model takes a longer time.

Instead of memory caching, you can store cached compilation artifacts on disk. Disk caching persists between MATLAB sessions and therefore improves the performance of the first compilation of a model in a given session. Use disk caching to accelerate model development and simulation processes between multiple sessions or multiple users.

Settings

off (default) | on
On

Use disk caching of compilation artifacts.

Off

Use memory caching. Reuse compilation artifacts within a single MATLAB session only.

Recommended Settings

ApplicationSetting
DebuggingNo Impact
TraceabilityNo Impact
EfficiencyOn
Safety precautionNo Impact

Programmatic Use

Parameter: SimscapeCompileArtifactsDiskCache
Type: character vector | string scalar
Value: 'on' | 'off'
Default: 'off'

Limitations

Using disk caching with parallel model reference builds is not supported. If the Enable parallel model reference builds option on the Model Referencing pane is on, model references that can be built in parallel use memory caching, instead of disk caching, and issue a warning in the build logs.

Version History

Introduced in R2024b