Regression caused by 9e4c26574a.
Add strip stack as a key to the final cache.
Use the pointer to the list of sequences, as it is the easiest one to
obtain in all places where it is needed. This is slightly different
from the code prior to the 9e4c26574a where strips.last() was used,
but it allows to use the same logic in the prefetch job.
Pull Request: https://projects.blender.org/blender/blender/pulls/141778
Make display channel part of the key for the final cache.
The prefetch uses display channel of 0, which is the default. It might
need to be adjusted, but it is unclear whether it was behaving different
prior to the 9e4c26574a.
Pull Request: https://projects.blender.org/blender/blender/pulls/141670
Before this change prefetching would not work correctly with only RAW
caches. The RAW caches wouldn't previously be emptied either if
switching them off while prefetching was turned on.
Now the prefetch will start prefetching from the start frame if it hits
the end frame and still have cache space to spare. This improves
playback when playing loops. It also makes it possible for end users to
define an area to pre-fetch by setting the preview range.
Rework internals of how VSE caching is done. Primarily to make all the
caching logic more understandable from development point of view, but
also has several user visible implications (more details in the PR):
- Simpler and fewer caching UI options,
- Disk cache is gone (primary reason: proxies are kinda the same thing),
- VSE cache size set in preferences is actual size used for VSE caches
now (previously caching stopped as soon as whole Blender used that
much memory, even if some memory usage was not about VSE at all),
- Certain scenarios of cache invalidation are faster now.
Pull Request: https://projects.blender.org/blender/blender/pulls/137926