Clear cache on new version

This commit is contained in:
Elio Struyf
2023-10-31 15:04:39 +01:00
parent 14ddd8b53c
commit 039170eae5
2 changed files with 7 additions and 1 deletions
+3 -1
View File
@@ -1,6 +1,6 @@
import { commands } from 'vscode';
import { COMMAND_NAME, ExtensionState } from '../constants';
import { Extension, Notifications } from '../helpers';
import { Extension, Logger, Notifications } from '../helpers';
export class Cache {
public static async registerCommands() {
@@ -29,6 +29,8 @@ export class Cache {
if (showNotification) {
Notifications.info('Cache cleared');
} else {
Logger.info('Cache cleared');
}
}
}
+4
View File
@@ -32,6 +32,7 @@ import { ContentFolder, Snippet, TaxonomyType } from '../models';
import { Notifications } from './Notifications';
import { Settings } from './SettingsHelper';
import { TaxonomyHelper } from './TaxonomyHelper';
import { Cache } from '../commands/Cache';
export class Extension {
private static instance: Extension;
@@ -104,6 +105,9 @@ export class Extension {
});
this.setVersion(installedVersion);
// Reset the cache
Cache.clear(false);
}
return {