Browse Source
Merge pull request #9824 from dashevchenko/securitySettingsCacheCleanup
Updated upgrade script for 3.6.1 to clean up securitySettings cache
pull/9832/head
Andrew Shvayka
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
6 additions and
0 deletions
-
application/src/main/java/org/thingsboard/server/service/install/update/DefaultCacheCleanupService.java
|
|
|
@ -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.
|
|
|
|
} |
|
|
|
|