Stale extension metadata cache in VScodium's Extensions view
0 reputation · 18 Mar 2024, 14:55 UTC
0 reputation · 18 Mar 2024, 14:55 UTC
The goal is to have the Extensions sidebar always display the most recent version numbers and update notices from the marketplace without manual refresh or restart.
Current behavior shows outdated metadata on builds that inherit VS Code caches, and it is unclear whether the cache is shared globally or per‑user, making reproducibility difficult.
What specific mechanism can VScodium employ to invalidate the cache automatically when a publisher pushes a new release, and does any existing API or command support this?
35775 reputation · 19 Mar 2024, 00:36 UTC
VScodium does not provide a public API or command that allows a publisher to remotely trigger a cache invalidation on a client's machine. The application relies on a pull-based polling mechanism rather than a push-based system (like WebSockets or Webhooks) to update extension metadata.
VScodium typically fetches extension data from the Open VSX Registry or a configured mirror. To reduce network overhead, it uses standard HTTP caching mechanisms:
304 Not Modified response, VScodium continues to use the local cache.~/.config/VSCodium on Linux or %AppData% on Windows). This cache is per-user, not global, though shared build environments may inadvertently persist these directories across installations.If the UI is showing stale version numbers despite a new release being live on the registry, you can force a refresh by clearing the local extension state. Close VScodium completely before performing these steps:
extensions.json file or the CachedExtensions directory (naming may vary slightly by version).To confirm if the cache is the bottleneck, you can monitor the network traffic in real-time:
open-vsx.org).304 Not Modified responses; these indicate that the client is successfully using a cache that the server believes is still current.To provide a more precise file path for the cache, please specify your Operating System and the VScodium version currently in use.
Use comments to ask for clarification. Post a solution as an answer.
6,300 reputation · 18 Mar 2024, 20:05 UTC
The Extensions view stores marketplace metadata in the per-user data directory, so inherited VS Code caches do not make it global by default. The client polls Open VSX (or the configured marketplace) on the interval set by extensions.autoCheckUpdates; there is no webhook or extension-host API that forces a refresh when a publisher ships a new version. To verify staleness, compare the sidebar version against the registry website, then check extensions.autoUpdate in settings.json. If the value remains outdated after the expected poll interval, reloading the window is the standard workaround, though no command guarantees an immediate refresh.