Skip to content

Commit 93b9258

Browse files
rgrunberfbricon
authored andcommitted
Set java.configuration.workspaceCacheLimit default value to 90.
- Avoid deleting temporary workspaces as they should have their own policy defined by the operating system - Enable cleaning of cache for workspaces that have been inactive for over 90 days Signed-off-by: Roland Grunberg <[email protected]>
1 parent fc4a2dd commit 93b9258

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@
361361
"null",
362362
"integer"
363363
],
364-
"default": null,
364+
"default": 90,
365365
"minimum": 1,
366366
"description": "The number of days (if enabled) to keep unused workspace cache data. Beyond this limit, cached workspace data may be removed.",
367367
"scope": "application"

src/extension.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -989,7 +989,8 @@ function isPrefix(parentPath: string, childPath: string): boolean {
989989
async function cleanJavaWorkspaceStorage() {
990990
const configCacheLimit = getJavaConfiguration().get<number>("configuration.workspaceCacheLimit");
991991

992-
if (!storagePath || !configCacheLimit) {
992+
// Also leave temporary workspaces alone as they should have their own policy
993+
if (!storagePath || !configCacheLimit || storagePath.includes('vscodesws')) {
993994
return;
994995
}
995996

0 commit comments

Comments
 (0)