Hi Andrew,
You’ve identified a common issue with MATLAB’s JCEF browser cache accumulating in user roaming profiles, which can become a significant storage burden in enterprise environments.
Answers to Your Questions
1. Can You Safely Delete the JCEF Cache Folders?
Yes, as long as MATLAB is not running, you can safely delete the contents of the jcef_cache folder (including all GUID-named subfolders). This cache is used by MATLAB’s internal Chromium Embedded Framework (JCEF) for its web-based features (Help, Add-Ons, etc.), and will be recreated as needed.
Steps:
- Ensure MATLAB is closed for the user.
- Delete the contents of:
C:\Users\<username>\AppData\Roaming\Mathworks\Matlab\<Matlab_Version>\LightweightBrowser\jcef_cache
2. Is There a MATLAB Setting to Control Cache Size or Housekeeping?
Unfortunately, as of MATLAB R2024a, there is no documented setting to limit or automatically clean up the JCEF cache. MATLAB does not appear to perform aggressive housekeeping on this cache.
Workarounds:
- Periodic Cleanup: Use Group Policy or login/logoff scripts to delete or prune the cache.
- Redirect the Cache: Advanced users may try to redirect this folder to a local (non-roaming) path using symbolic links
3. Is Deleting the Cache Safe?
Yes, deleting the cache (while MATLAB is not running) is safe. Users may notice slightly slower loading the first time they access web-based features after deletion, but there is no loss of user data or settings.