Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
wangyun0831 committed Dec 8, 2021
1 parent 5787a5c commit be4fddd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions source/hunt/cache/CacheFactory.d
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ class CacheFactory
return new Cache(memoryAdapter, option);

case AdapterType.REDIS:
return new Cache(new RedisAdapter(option.redisPool), option, memoryAdapter);
return new Cache(new RedisAdapter(option.redis), option, memoryAdapter);

case AdapterType.REDIS_CLUSTER:
return new Cache(new RedisClusterAdapter(option.redisPool, option.redisCluster), option, memoryAdapter);
return new Cache(new RedisClusterAdapter(option.redis, option.redisCluster), option, memoryAdapter);

// version(WITH_HUNT_MEMCACHE)
// {
Expand Down
6 changes: 3 additions & 3 deletions source/hunt/cache/CacheOptions.d
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ class CacheOptions {
uint maxEntriesLocalDisk = 10000;

this() {
redisPool = new RedisPoolOptions();
redis = new RedisPoolOptions();
}

RedisClusterConfig redisCluster;
RedisPoolOptions redisPool;
RedisPoolOptions redis;
MemcacheConf memcache;
RocksdbConf rocksdb;

Expand All @@ -62,7 +62,7 @@ class CacheOptions {
override string toString() {
if (adapter == ADAPTER_MEMORY) {
return format("adapter: %s, prefix: %s, Redis: {%s}", adapter,
prefix, redisPool.toString());
prefix, redis.toString());
} else if (adapter == ADAPTER_MEMCACHE) {
return format("adapter: %s, prefix: %s, Memcache: {%s}", adapter,
prefix, memcache.toString());
Expand Down

0 comments on commit be4fddd

Please sign in to comment.