Share indexes among workspaces#2811
Conversation
|
If it makes sense, this should probably close out #2723 . |
| function resolveIndexCache(context: ExtensionContext) { | ||
| let sharedIndexLocation: string = getJavaConfiguration().get("sharedIndexes.location"); | ||
| if (sharedIndexLocation === "$DEFAULT_CACHE") { | ||
| sharedIndexLocation = path.resolve(context.globalStoragePath, "index"); |
There was a problem hiding this comment.
globalStoragePath is deprecated. Maybe consider using globalStorageUri and get the path only when the scheme is file?
There was a problem hiding this comment.
this is outdated. we have changed it to some OS specific cache directory.
|
Comments:
|
|
I've seen general pushback to using the user home directory to store cache data. Instead, look into using OS specific cache directories, eg. ~/Library/Caches on MacOS |
f42c86b to
00a7403
Compare
| export function getSharedIndexCache(): string { | ||
| let location: string = getJavaConfiguration().get("sharedIndexes.location"); | ||
| if (!location) { | ||
| switch (process.platform) { |
There was a problem hiding this comment.
Is there a reason you abandoned the use of context.globalStorageUri ?
There was a problem hiding this comment.
In our last sync-up meeting, one comment is to save the index into the OS specific cache directory, some place like what Gradle does. That's why I changed the cache from the global storage location to some OS specific directory.
…n shared indexes Signed-off-by: Jinbo Wang <[email protected]>
Signed-off-by: Jinbo Wang <[email protected]>
96b9d5e to
f8ac050
Compare
Signed-off-by: Jinbo Wang <[email protected]>
Requires eclipse-jdtls/eclipse.jdt.ls#2341
Provide a setting to control the shared index location, by default, it uses the global extension cache as the common index location.