You are here: Getting Started > Managing Scripts > Image Caching > Defining the Settings for Caching

Defining the Settings for Caching

You can define the settings for caching in the Preferences.

To Define the Settings for Caching

1.   Select Edit > Preferences (or press Shift+S).

The Preferences dialog opens.

2.   Under disk cache, specify where you want Nuke to cache out data to disk. Pick a local disk (for example, c:/temp), preferably with the fastest access time available.

The environment variable NUKE_DISK_CACHE can be used to override this setting. For more information, see Environment Variables in the Configuring Nuke chapter in the Nuke User Guide.

3.   Using the disk cache size control, pick the maximum size the disk cache can reach. Ensure there is enough space on the disk for this to be reached. The default value is 10GB, but a larger value, such as 50GB, can often be used.

The environment variable NUKE_DISK_CACHE_GB can be used to override this setting. For more information, see Environment Variables in the Configuring Nuke chapter in the Nuke User Guide.

4.   Click the Save Prefs button to update preferences and then restart Nuke.

Once these settings are defined, the automatic caching of images is enabled. The Viewer caches each frame it displays in the directory specified. If you add a DiskCache node into your script, it also uses the same directory.

The disk cache is preserved when you quit Nuke so it can be used again later. However, when the cache becomes full, old items are automatically deleted to make room for newer items.