Add manual thumbnail cache cleanup #4595
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The only place I could really find that was out of the way for the button was below the gallery images list. To prevent accidental activation, it requires a double-click/double-tap*, and by default it isn't displayed unless the setting is enabled. That said, because of the way Gradio's visibility classes work, it'll only be visible when viewing a folder that isn't empty (which shouldn't be an issue).There's also a fix for a logic bug (checking value instead of if key exists, so it never worked when the value was false) with monitored settings.* (Especially important on mobile since it ends up between the file list and the image display. It's not a great spot, which is partially why I have it set to not display by default.)Adds a dynamic label after the "Use image gallery cache" setting that shows the current active folder and can be double-clicked/tapped (to prevent accidental triggering) to clear the thumbnail cache for that folder.