Skip to content

Add menu item to clear configuration cache#21373

Draft
Copilot wants to merge 4 commits into
mainfrom
copilot/add-clear-configuration-cache
Draft

Add menu item to clear configuration cache#21373
Copilot wants to merge 4 commits into
mainfrom
copilot/add-clear-configuration-cache

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 4, 2026

Adds Help → Clear Configuration Cache... menu item with confirmation dialog. Users can clear the current version's cache directory and optionally clear cache from previous Cura versions.

Implementation

  • CuraActions.py: clearConfigurationCache(clear_all_versions) method

    • Removes cache/ from current data storage path via shutil.rmtree()
    • When clear_all_versions=True, scans parent directory for folders matching ^\d+\.\d+$ pattern and removes their cache/ subdirectories
    • Exception handling with user-facing Message dialogs
  • Actions.qml: Registered clearConfigurationCache action

  • HelpMenu.qml: Added menu item after "Open Cura Log File"

  • Cura.qml: UM.Dialog with checkbox for previous versions option

Example Usage

# Clears only current version cache
CuraActions.clearConfigurationCache(clear_all_versions=False)

# Clears cache from /path/to/cura/5.0/cache, /path/to/cura/5.1/cache, etc.
CuraActions.clearConfigurationCache(clear_all_versions=True)

Version pattern validation prevents accidental deletion of non-Cura directories in the data storage root.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 3 commits February 4, 2026 13:02
Co-authored-by: jellespijker <8535734+jellespijker@users.noreply.github.com>
Co-authored-by: jellespijker <8535734+jellespijker@users.noreply.github.com>
…idation

Co-authored-by: jellespijker <8535734+jellespijker@users.noreply.github.com>
Copilot AI changed the title [WIP] Add menu item to clear configuration cache Add menu item to clear configuration cache Feb 4, 2026
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

Successfully merging this pull request may close these issues.

2 participants