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.

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
41,893 questions
{count} votes

Your answer

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