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) {
|
if(password != null) {
|
||||||
this.jedis.auth(password);
|
this.jedis.auth(password);
|
||||||
}
|
}
|
||||||
|
if(prefix != null) {
|
||||||
keyPrefix = prefix.endsWith(".") ? prefix : prefix + ".";
|
keyPrefix = prefix.endsWith(".") ? prefix : prefix + ".";
|
||||||
|
} else {
|
||||||
|
keyPrefix = "";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void connect() {
|
public void connect() {
|
||||||
|
@ -23,7 +23,11 @@ public abstract class RedisPoolCacheStore<T> implements CacheStore<T> {
|
|||||||
redisServerUri.getPort() <= 0 ? 6379 : redisServerUri.getPort(),
|
redisServerUri.getPort() <= 0 ? 6379 : redisServerUri.getPort(),
|
||||||
timeout <= 0 ? Protocol.DEFAULT_TIMEOUT : timeout, password);
|
timeout <= 0 ? Protocol.DEFAULT_TIMEOUT : timeout, password);
|
||||||
log = LoggerFactory.getLogger("RedisPoolCacheStore@" + Integer.toHexString(jedisPool.hashCode()));
|
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
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user