dever 6 年 前
コミット
98006671b7
1 ファイル変更18 行追加13 行削除
  1. 18 13
      config/env/localhost/default.php

+ 18 - 13
config/env/localhost/default.php

@@ -39,12 +39,13 @@ $config['database'] = array
 		'password' => isset($dc['mysql']) ? $dc['mysql']['password'] : '123456',
 		'charset' => 'utf8',
 	),
-'session' => array
+
+    'session' => array
     (
         'type' => 'redis',
-        'host' => '192.168.0.220',
-        'port' => '6379',
-        'password' => '',
+        'host' => isset($dc['redis']) ? $dc['redis'][0]['host'] : 'server-redis',
+        'port' => isset($dc['redis']) ? $dc['redis'][0]['port'] : '6379',
+        'password' => isset($dc['redis']) ? $dc['redis'][0]['password'] : 'dm_redis_123',
     )
 );
 
@@ -61,17 +62,16 @@ $config['cache'] = array
     'load' => 0,
     # 启用load加载器的远程加载缓存
     'curl' => 0,
+    # 启用路由缓存
+    'route' => 36000,
 
     # 缓存精细控制,可以根据缓存的key(mysql为表名、service为小写类名,规则是模糊匹配),来控制每一条缓存
-    'loadKey' => array
-    (
-        # 定义缓存名为auth.data的缓存时间
-        //'auth.data' => 200,
-    ),
-    'mysqlNone' => array
+    'routeKey' => array
     (
-        'passport',
-        'oauth',
+        'journal.buy_action' => 0,
+        'journal.code' => 0,
+        'passport' => 0,
+        'oauth' => 0,
     ),
     
     # 缓存清理的参数名,请通过shell=clearcache执行
@@ -88,13 +88,18 @@ $config['cache'] = array
     (
         array
         (
-            'host' => '192.168.0.220',
+            'host' => 'server-redis',
             'port' => '6379',
             'weight' => 100,
+            'password' => 'dm_redis_123',
         ),
     ),
 );
 
+if (isset($dc['redis'])) {
+    $config['cache']['store'] = $dc['redis'];
+}
+
 $config['debug'] = array
 (
 	'log' => array('type' => 'file'),