What is an acceptable size for a users JCEF_CACHE folder and what's the best way to clean it?

6 views (last 30 days)
Since the JCEF_CACHE folder is located within the roaming profile (C:\Users\<username>\AppData\Roaming\Mathworks\Matlab\<Matlab_Version>\LightweightBrowser\jcef_cache) it is being replicated back to our domain Windows profile store. I've seen the folder above contain in excess of 6GB of data per user, with folder dates going back in excess of 3 years. Is there a recommended way to delete the files since Matlab doesn't seem to be housekeeping itself? As long as the user in question is not in Matlab, can I simply delete all the GUID named folders prior to the user logging off? Of are there some Matlab configuration settings I can change that will instruct it to housekeep more thoughly?

Answers (1)

Aditya
Aditya 2 minutes ago
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.

Categories

Find more on Performance and Memory in Help Center and File Exchange

Tags

Products


Release

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!