Merge pull request #2354 from github/koesie10/clear-pack-cache-on-create
Clear pack cache on create and delete
This commit is contained in:
@@ -707,9 +707,14 @@ async function activateWithInstalledDistribution(
|
|||||||
for (const glob of PACK_GLOBS) {
|
for (const glob of PACK_GLOBS) {
|
||||||
const fsWatcher = workspace.createFileSystemWatcher(glob);
|
const fsWatcher = workspace.createFileSystemWatcher(glob);
|
||||||
ctx.subscriptions.push(fsWatcher);
|
ctx.subscriptions.push(fsWatcher);
|
||||||
fsWatcher.onDidChange(async (_uri) => {
|
|
||||||
|
const clearPackCache = async (_uri: Uri) => {
|
||||||
await qs.clearPackCache();
|
await qs.clearPackCache();
|
||||||
});
|
};
|
||||||
|
|
||||||
|
fsWatcher.onDidCreate(clearPackCache);
|
||||||
|
fsWatcher.onDidChange(clearPackCache);
|
||||||
|
fsWatcher.onDidDelete(clearPackCache);
|
||||||
}
|
}
|
||||||
|
|
||||||
void extLogger.log("Initializing database manager.");
|
void extLogger.log("Initializing database manager.");
|
||||||
|
|||||||
Reference in New Issue
Block a user