mirror of
https://github.com/LamGC/ContentGrabbingJi.git
synced 2025-04-30 06:37:36 +00:00
[Change] 增加对无前缀情况下的处理;
This commit is contained in:
parent
d4266aaa57
commit
1653372d3e
@ -32,7 +32,11 @@ public abstract class RedisCacheStore<T> implements CacheStore<T> {
|
||||
if(password != null) {
|
||||
this.jedis.auth(password);
|
||||
}
|
||||
keyPrefix = prefix.endsWith(".") ? prefix : prefix + ".";
|
||||
if(prefix != null) {
|
||||
keyPrefix = prefix.endsWith(".") ? prefix : prefix + ".";
|
||||
} else {
|
||||
keyPrefix = "";
|
||||
}
|
||||
}
|
||||
|
||||
public void connect() {
|
||||
|
@ -23,7 +23,11 @@ public abstract class RedisPoolCacheStore<T> implements CacheStore<T> {
|
||||
redisServerUri.getPort() <= 0 ? 6379 : redisServerUri.getPort(),
|
||||
timeout <= 0 ? Protocol.DEFAULT_TIMEOUT : timeout, password);
|
||||
log = LoggerFactory.getLogger("RedisPoolCacheStore@" + Integer.toHexString(jedisPool.hashCode()));
|
||||
this.keyPrefix = prefix.endsWith(".") ? prefix : prefix + ".";
|
||||
if(prefix != null) {
|
||||
keyPrefix = prefix.endsWith(".") ? prefix : prefix + ".";
|
||||
} else {
|
||||
keyPrefix = "";
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user