1.安装redis扩展 和 可视化工具
2.config/config_global.php
- $_config['memory']['redis']['server'] = '127.0.0.1';
- $_config['memory']['redis']['port'] = 6379;
- $_config['memory']['redis']['pconnect'] = 1;
- $_config['memory']['redis']['timeout'] = '0';
- $_config['memory']['redis']['requirepass'] = 'xmspace.net';
- $_config['memory']['redis']['serializer'] = 1;
复制代码
3.source/class/memory/memory_driver_redis.php
搜索:
- $this->enable = $connect ? true : false;
- if ($this->enable) {
-
复制代码
改成
- $this->enable = $connect ? true : false;
- if ($this->enable) {
- if ($config['requirepass']) {
- $this->obj->auth($config['requirepass']);
- }
复制代码
4.性能最大优化:
|