-
Notifications
You must be signed in to change notification settings - Fork 51
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
[Problem/Bug]: Cache constantly growing even when not browsing. #4410
Comments
It sounds like related to http cache. If you look at the related http response headers, you might be able to figure out what is cached unnecessarily. If you have control over the related server, you could change the header it sends out to avoid unnecessary cache. At WebView2 level, there is ClearBrowsingData API to clear specific kind of caches including COREWEBVIEW2_BROWSING_DATA_KINDS_DISK_CACHE. However, that would clear all caches and impact page load. There is a Chromium command line switch --disk-cache-size that could specify desired disk cache limit in bytes. You could try it out. Note that it is a soft limit that the code makes best effort to maintain, not a hard limit. But it should prevent the cache from keep growing forever. |
Closing issue as it has been resolved |
I didn't realize it was solved. Thank you... |
What happened?
I am using webView2 to display an HMI.
This HMI is basically just displaying status from some "OPC xml" requests.
The problem is that, something in this HMI is making my cache folder constantly growing as soon as the page is active.
1- Is is possible to prevent certain files from being cached?
2- The only "relevant" thing that I can see so far in the debug console (tab network) is "http://192.*****/authinfo.xmlf?r=0.8826645356481213"
I assume this type of request is storing a new xml file in the cache every time, does this sounds plausible ?
If so, is there any way to prevent the client to cache such type of files with unique ID after it's extension?
3- Is there any advanced configuration for the cache, or options to clean only some of the cached files, by extension for example, instead of the whole cache?
Importance
Moderate. My app's user experience is affected, but still usable.
Runtime Channel
Stable release (WebView2 Runtime)
Runtime Version
No response
SDK Version
1.0.2365.46
Framework
Win32
Operating System
Windows 10
OS Version
19045.4046
Repro steps
To reproduce, one needs to access my host by remote I think.
Repros in Edge Browser
Yes, issue can be reproduced in the corresponding Edge version
Regression
No, this never worked
Last working version (if regression)
No response
The text was updated successfully, but these errors were encountered: