Oink

Caching

The GPU, RAM and Viewer frame caches, and how to clear them.

raw .md

Oink keeps results so it does not recompute what has not changed.

What is cached

  • Node results. Each node's result is stored under a key made of its knobs, its inputs and the frame. Change a knob and only that node and the nodes below it recompute; everything above comes from the cache.
  • Viewer frames. Frames you have viewed are kept in memory in the user interface. Playing a range a second time plays from memory. The timeline shows the cached frames as a green bar. Any edit makes the old frames stale, and they are dropped.
  • Disk cache. Viewer frames that took 30 ms or more to compute are also kept on disk, so they are read back instead of recomputed, in this session or after you reopen the comp. A frame is never kept on disk when it has an AI node upstream or while you drag a knob. The default size is 10 GB, set in Preferences › Performance › Caching (size in GB and folder; 0 turns it off). The oldest-used files go first when the folder is full.
  • Read-ahead. While you step or play through an image sequence, a Read loads the next frames in the background.
  • Idle fill. When you stop interacting for a moment, the Viewer fills its cache forward from the current frame.

Playback waits for frames that are not ready rather than skipping them, so the first pass of a heavy comp may play slower than real time; the second plays from memory.

Clearing it

  • F12 or Cache › Clear Buffers: empties the Viewer's frame cache and the playback cache.
  • Cache › Clear Disk Cache empties the disk cache. Cache › Clear All does both.
  • Viewer › Refresh does the same as Clear Buffers.

Local copies of files on a network share are a separate feature: see Localization.

Limits

Defaults: 8 GB for the Viewer's frames, 2 GB of GPU memory for node results (plus room for the frame on screen and a RAM tier). Advanced users can change the backend limits with environment variables: OPENCOMP_GPU_CACHE_MB, OPENCOMP_PIN_CACHE_MB, OPENCOMP_RAM_CACHE_MB, and OPENCOMP_READAHEAD (frames loaded ahead, 2 by default; 0 turns it off).

On this page