mirror of
https://github.com/estruyf/vscode-front-matter.git
synced 2026-07-07 02:11:25 +02:00
Clear cache on new version
This commit is contained in:
@@ -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');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user