Why do we cache?
The caches are short term memory for various operations that may need to be repeated in a short time domain. The need fo repeat the frame result may vary depending on the situation. For example, if you are editing and trying to explore the effect of a plugin or auto tweak, then the cache is of little or no value, since you are exploring new data on every single frame render. Or, maybe you have seen all of that, and are now interested in the continuous playback, and now those cache frames are very interesting. It just depends on your intent. Usually, singe frames are not so expensive that they can not be rendered quickly enough, and continuous playback is helped by caching since you may be reviewing the aggregate result.
There is more than one kind of cache. there are at least three general caches in use normally.
1) the time line picon data (thumbnails) is cached.
2) file codec input in cached.
3) renderengine results are cached.
The vrender operation is reading the cache from the renderengine. This generally helps, like when the asset is single frame, like a png file being repeated for 3 seconds.
All of the caches need to be purged or expired as time and changes demand cache reconstruction. The item being removed is usually called a victim. This vernacular is not widely used in cinelerra, but is normal for cpu and hw cache designs. The heuristic used to select the next victim is not always last in first out. A common variant is to include access frequency and item costs as factors in the decision. Hardware usually evicts entire cache lines and reloads memory with cache load bursts, but in clnelerra the base algorithm is just to claim the oldest (least recently used) item.
file.C (read_frame) for codec input, resourcepixmap.C, resourcethread.C are the basic cinelerra routines involved in picon caching, and a/vmodule use the renderengine caches to access previous/current frame output.
gg