<ul dir="auto">
<li>Electron version: 2.0.0.beta-1</li>
<li>Operating system: 10.13.3 Beta (17D34a)</li>
</ul>
<h3 dir="auto">Expected behavior</h3>
<p dir="auto">Electron should not crash when using <code class="notranslate">browserWindow.setVibrancy</code></p>
<h3 dir="auto">Actual behavior</h3>
<p dir="auto">Electron crashes intermittently. Crash report:<br>
<a href="https://gist.github.com/tommoor/90b7b3db53a32f9dd165bb234b9f2d9d">https://gist.github.com/tommoor/90b7b3db53a32f9dd165bb234b9f2d9d</a></p>
<h3 dir="auto">Problem Description</h3>
<p dir="auto">I would like to customize the location of the Electron/Chromium cache (for Windows and other OS/s). Currently cache used the same folder than getPath('userData')<br>
2 reasons :</p>
<ul dir="auto">
<li>having cache in the roaming user part impacts the size of the profile. When your deploy your application on system like Citrix, it has a huge cost ($) in term of space disk and cost (time) to synchronize profile.</li>
<li>we store our own user data under getPath('userData'). But this folder is shared with the Electron cache, so there is a mix of Electron folders/files and of our product folders/file. It is bit confusing.</li>
</ul>
<h3 dir="auto">Proposed Solution</h3>
<p dir="auto">I see in C++ code an attempt of 'cache'/ 'userCache' path implementation. But not finished. As far as I see, it would be to add a piece of code here (very roughly) :</p>
<p dir="auto">src\electron\atom\browser\atom_browser_context.cc<br>
`<br>
AtomBrowserContext::AtomBrowserContext<br>
...</p>
<blockquote>
<blockquote>
<p dir="auto">if (!base::PathService::Get(DIR_CACHE, &amp;path_)) {<br>
if (!base::PathService::Get(DIR_USER_DATA, &amp;path_)) {<br>
base::PathService::Get(DIR_APP_DATA, &amp;path_);<br>
path_ = path_.Append(base::FilePath::FromUTF8Unsafe(GetApplicationName()));<br>
base::PathService::Override(DIR_USER_DATA, path_);<br>
}<br>
}<br>
`</p>
</blockquote>
</blockquote>
<h3 dir="auto">Alternatives Considered</h3>
<p dir="auto">We customized setPath('userData') at startup of our application to force the cache to another location but later in the code, we can no more use getPath('userData') for storing our data. We expose a new method but it is less friendly and error prone.</p>
<h3 dir="auto">Additional Information</h3>
<p dir="auto">I have not the background /context of the 1st attempt, it may have a good reason to stop. If you can share your concerns and see if it is feasible, will be grateful</p>
<p dir="auto">I can manage a MR, if you agree.</p>