added clean cache for the upgrade

This commit is contained in:
YevhenBondarenko 2023-12-28 16:32:10 +01:00
parent 61602330ec
commit dd71198908
2 changed files with 6 additions and 0 deletions

View File

@ -276,6 +276,8 @@ public class ThingsboardInstallService {
} else {
log.info("Skipping images migration. Run the upgrade with fromVersion as '3.6.2-images' to migrate");
}
case "3.6.3":
log.info("Upgrading ThingsBoard from version 3.6.3 to 3.7.0 ...");
//TODO DON'T FORGET to update switch statement in the CacheCleanupService if you need to clear the cache
break;
default:

View File

@ -94,6 +94,10 @@ public class DefaultCacheCleanupService implements CacheCleanupService {
clearCacheByName(SECURITY_SETTINGS_CACHE);
clearCacheByName(RESOURCE_INFO_CACHE);
break;
case "3.6.3":
log.info("Clearing cache to upgrade from version 3.6.3 to 3.7.0");
clearAll();
break;
default:
//Do nothing, since cache cleanup is optional.
}