title: Where to store global binary data for a vscode extension
body: <p>I've written a language server extension for VS code. In order to improve start-up time, I'd like to cache some global state. I'm struggling to find a safe, user transparent, location.</p>
  
  <ul>
  <li>The cache is shared between all workspaces</li>
  <li>It consists of 200-300MB of serialized data</li>
  <li>It should persist between updates of the extension</li>
  <li>The extension is cross-platform</li>
  </ul>
  
  <p>I've discovered the following four options, but none of them seem appropriate:</p>
  
  <ol>
  <li><code>ExtensionContext.extensionPath</code>: This is almost perfect. Obvious to the user, safe sandboxed space. However, it's wiped on extension update.</li>
  <li><code>ExtensionContext.storagePath</code>: This is not global, and hard for the user to clear, so would very quickly end up using GBs of storage space.</li>
  <li><code>ExtensionContext.globalState</code>: Placing 300MB of binary data into a JSON dictionary store seems bad.</li>
  <li><code>%UserData%</code>/linux/OSX equivalents: Adding and deleting files in uncontrolled general userspace is a risk I'd rather avoid.</li>
  </ol>
  
  <p>Where's the appropriate place to store this data?</p>