2021-08-07 04:05:20 -05:00
|
|
|
<?php
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
2022-01-20 13:16:37 -06:00
|
|
|
use Shlinkio\Shlink\Core\Config\EnvVars;
|
2021-08-07 04:05:20 -05:00
|
|
|
|
|
|
|
return (static function (): array {
|
2022-04-23 05:44:17 -05:00
|
|
|
$redisServers = EnvVars::REDIS_SERVERS->loadFromEnv();
|
2021-08-07 04:05:20 -05:00
|
|
|
|
2022-01-01 11:40:48 -06:00
|
|
|
return match ($redisServers) {
|
|
|
|
null => [],
|
2021-08-07 04:05:20 -05:00
|
|
|
default => [
|
|
|
|
'cache' => [
|
|
|
|
'redis' => [
|
|
|
|
'servers' => $redisServers,
|
2022-04-23 05:44:17 -05:00
|
|
|
'sentinel_service' => EnvVars::REDIS_SENTINEL_SERVICE->loadFromEnv(),
|
2021-08-07 04:05:20 -05:00
|
|
|
],
|
|
|
|
],
|
|
|
|
],
|
|
|
|
};
|
|
|
|
})();
|