-
Notifications
You must be signed in to change notification settings - Fork 133
Module caching
The language server is able to cache some modules to disk, and reload them in future analysis sessions, giving better performance on frequently used modules.
By default, the language server will cache the standard library, but this feature can be controlled by setting python.analysis.cachingLevel
. To enable the caching of the standard library:
"python.analysis.cachingLevel": "System"
Or to disable caching entirely:
"python.analysis.cachingLevel": "None"
The cache exists on disk, in a different place depending on the operating system. If you need to delete this cache, you can do so by navigating to one of these folders, then deleting the folders that start with "analysis" (like "analysis.v2").
%LOCALAPPDATA%\Microsoft\Python Language Server
(which is Environment.SpecialFolder.LocalApplicationData). Typically:C:\Users\\%USER_NAME%\AppData\Local\Microsoft\Python Language Server
$XDG_CACHE_HOME/Microsoft/Python Language Server
, or if XDG_CACHE_HOME is not set, $HOME/.cache/Microsoft/Python Language Server
$HOME/Library/Caches/Microsoft/Python Language Server