Share via

WebView2 set cache size

Pablo Glomby 186 Reputation points
2021-11-16T18:26:39.04+00:00

I am using a webView2 control in .net and I want to limit the internal cache size but I am not finding the way...
It seems it's not documented.
I do for example:
CoreWebView2EnvironmentOptions options = new CoreWebView2EnvironmentOptions("--disk-cache-size-20000000");
...
var webView2Environment = await CoreWebView2Environment.CreateAsync(null, cacheFolderPath, options);
but it does not work.

Any idea?
Thanks.

Community Center | Not monitored

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.