Browse Source
Merge pull request #10814 from thingsboard/fix/mobile-secret-cache
Fix MobileSecretRedisCache
pull/10828/head
Viacheslav Klimov
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
1 additions and
2 deletions
-
application/src/main/java/org/thingsboard/server/service/mobile/secret/MobileSecretRedisCache.java
|
|
|
@ -23,12 +23,11 @@ import org.thingsboard.server.cache.RedisTbTransactionalCache; |
|
|
|
import org.thingsboard.server.cache.TBRedisCacheConfiguration; |
|
|
|
import org.thingsboard.server.cache.TbJsonRedisSerializer; |
|
|
|
import org.thingsboard.server.common.data.CacheConstants; |
|
|
|
import org.thingsboard.server.common.data.id.UserId; |
|
|
|
import org.thingsboard.server.common.data.security.model.JwtPair; |
|
|
|
|
|
|
|
@ConditionalOnProperty(prefix = "cache", value = "type", havingValue = "redis") |
|
|
|
@Service("MobileSecretCache") |
|
|
|
public class MobileSecretRedisCache extends RedisTbTransactionalCache<UserId, JwtPair> { |
|
|
|
public class MobileSecretRedisCache extends RedisTbTransactionalCache<String, JwtPair> { |
|
|
|
|
|
|
|
public MobileSecretRedisCache(TBRedisCacheConfiguration configuration, CacheSpecsMap cacheSpecsMap, RedisConnectionFactory connectionFactory) { |
|
|
|
super(CacheConstants.MOBILE_SECRET_KEY_CACHE, cacheSpecsMap, connectionFactory, configuration, new TbJsonRedisSerializer<>(JwtPair.class)); |
|
|
|
|