You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
482 B
21 lines
482 B
5 years ago
|
<?php
|
||
|
|
||
|
$cache_config = [
|
||
|
'class' => env('CACHE_CLASS', 'yii\caching\FileCache')
|
||
|
];
|
||
|
|
||
|
switch ($cache_config['class']) {
|
||
|
case 'yii\caching\MemCache':
|
||
|
$cache_config['servers'] = [
|
||
|
[
|
||
|
'host' => env('MEMCACHE_SERVER_HOST', '127.0.0.1'),
|
||
|
'port' => env('MEMCACHE_SERVER_PORT', 11211),
|
||
|
'weight' => 100,
|
||
|
],
|
||
|
];
|
||
|
break;
|
||
|
default:
|
||
|
break;
|
||
|
}
|
||
|
|
||
|
return $cache_config;
|