Merge pull request #9824 from dashevchenko/securitySettingsCacheCleanup

Updated upgrade script for 3.6.1 to clean up securitySettings cache
This commit is contained in:
Andrew Shvayka 2023-12-12 15:01:21 +02:00 committed by GitHub
commit 9fe0a3896b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -27,6 +27,8 @@ import org.springframework.stereotype.Service;
import java.util.Objects;
import java.util.Optional;
import static org.thingsboard.server.common.data.CacheConstants.SECURITY_SETTINGS_CACHE;
@RequiredArgsConstructor
@Service
@Profile("install")
@ -86,6 +88,10 @@ public class DefaultCacheCleanupService implements CacheCleanupService {
log.info("Clearing cache to upgrade from version 3.4.4 to 3.5.0");
clearAll();
break;
case "3.6.1":
log.info("Clearing cache to upgrade from version 3.6.1 to 3.6.2");
clearCacheByName(SECURITY_SETTINGS_CACHE);
break;
default:
//Do nothing, since cache cleanup is optional.
}