Make clearCacheInDatabase not take a cancellation token

This commit is contained in:
Robert
2024-03-28 10:45:17 +00:00
parent 6b0f7e86fa
commit 47a5993333
2 changed files with 3 additions and 8 deletions

View File

@@ -660,20 +660,18 @@ export class DatabaseUI extends DisposableObject {
private async handleClearCache(): Promise<void> {
return withProgress(
async (_progress, token) => {
async () => {
if (
this.queryServer !== undefined &&
this.databaseManager.currentDatabaseItem !== undefined
) {
await this.queryServer.clearCacheInDatabase(
this.databaseManager.currentDatabaseItem,
token,
);
}
},
{
title: "Clearing cache",
cancellable: true,
},
);
}

View File

@@ -107,10 +107,7 @@ export class QueryRunner {
this.qs.onDidStartQueryServer(callBack);
}
async clearCacheInDatabase(
dbItem: DatabaseItem,
token: CancellationToken,
): Promise<void> {
async clearCacheInDatabase(dbItem: DatabaseItem): Promise<void> {
if (dbItem.contents === undefined) {
throw new Error("Can't clear the cache in an invalid database.");
}
@@ -120,7 +117,7 @@ export class QueryRunner {
dryRun: false,
db,
};
await this.qs.sendRequest(clearCache, params, token);
await this.qs.sendRequest(clearCache, params);
}
async trimCacheInDatabase(