redis 설정 변경

This commit is contained in:
2026-03-18 14:33:17 +09:00
parent a6ae1bd377
commit 9138fa9c16
2 changed files with 14 additions and 9 deletions

View File

@@ -159,13 +159,13 @@ class Cache extends BaseConfig
{
parent::__construct();
// Redis 설정에 .env 값을 할당 (이전 논의된 Docker 호스트 이름 'redis' 사용)
// Redis 설정에 환경 변수 값을 할당 (두 가지 환경 변수 형식 지원)
$this->redis = [
'host' => env('redis.default.host', '127.0.0.1'),
'password' => (env('redis.default.password') === '' || env('redis.default.password') === null) ? null : env('redis.default.password'),
'port' => (int)env('redis.default.port', 6379),
'timeout' => (int)env('redis.default.timeout', 0),
'database' => (int)env('redis.default.database', 0)
'host' => env('REDIS_HOST', env('redis.default.host', '127.0.0.1')),
'password' => env('REDIS_PASSWORD', env('redis.default.password')) ?: null,
'port' => (int)(env('REDIS_PORT', env('redis.default.port', 6379))),
'timeout' => (int)(env('REDIS_TIMEOUT', env('redis.default.timeout', 0))),
'database' => (int)(env('REDIS_DATABASE', env('redis.default.database', 0)))
];
// 필요하다면, 이 생성자에서 $handler나 $backupHandler 같은 다른 설정도