feat : order

This commit is contained in:
2025-03-04 15:41:51 +08:00
parent 319f0c03d4
commit 11b4496fa7
7 changed files with 69 additions and 29 deletions

View File

@@ -64,7 +64,7 @@ class ConfigCache
* @param $key
* @param int $isRedis
* @param int $expire
* @return false|HigherOrderTapProxy|mixed|\Redis|string|null
* @return false|HigherOrderTapProxy|mixed|\Redis|string
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
@@ -77,10 +77,10 @@ class ConfigCache
if ($isRedis == 1) {
$this->redis->setEx($redisKey, $value, $expire,RedisCode::SYSTEM_DB);
}
return $value;
return $value ?? ConfigCode::DEFAULT_VALUE[$key];
}
return $this->redis->get($key,RedisCode::SYSTEM_DB) ?? ConfigCode::DEFAULT_VALUE[$key];
return $this->redis->get($redisKey,RedisCode::SYSTEM_DB) ?? ConfigCode::DEFAULT_VALUE[$key];
}
/**