Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing ImageReader::refreshCount() invalidates all ImageReader caches, not just the current #1514

Open
HughMacdonald opened this issue Oct 21, 2015 · 1 comment

Comments

@HughMacdonald
Copy link
Contributor

It appears that when refreshCountPlug() on ImageReader is changed, it causes ImageReader to call

imageCache()->invalidate_all( true );

This will clear the cache for every single ImageReader node, rather than just for the current one.

@johnhaddon
Copy link
Member

Note though that in the face of multiple contexts there is no such thing as "the current one". If I have an image sequence and hit refresh and then hit play, I expect all the frames to be refreshed. That's the simple case - the more complex one involves arbitrary ${variable} substitutions in the filename.

I think the best we can aim for is to take the longest substitution-free prefix from the unsubstituted filename, and then remove all images with that prefix from the cache. Do we have the ability to query the current list of cached files from OIIO? I guess we could track the queries we've made ourselves if we really had to?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants