數(shù)據(jù)優(yōu)化插件用于加速cms運(yùn)行效率以及對(duì)數(shù)據(jù)庫查詢的優(yōu)化,避免無用查詢的存在同時(shí)提高網(wǎng)站的訪問效率。
一、緩存配置
判斷系統(tǒng)是否開啟緩存配置來加速php程序運(yùn)行效率。
1、文件緩存
是默認(rèn)程序緩存,只需要開啟cache/目錄的可寫入權(quán)限即可打開此緩存。
2、Memcached緩存
配置文件config/memcached.php
<?php
if (!defined('BASEPATH')) exit('No direct script access allowed');
$config = array(
'default' => array(
'hostname' => '127.0.0.1',
'port' => '11211',
'weight' => '1',
),
);3、Redis 配置
配置文件config/redis.php
<?php
if (!defined('BASEPATH')) exit('No direct script access allowed');
$config['socket_type'] = 'tcp'; //`tcp` or `unix`
$config['socket'] = '/var/run/redis.sock'; // in case of `unix` socket type
$config['host'] = '127.0.0.1';
$config['password'] = NULL;
$config['port'] = 6379;
$config['timeout'] = 0;二、頁面標(biāo)簽執(zhí)行效率

通過開發(fā)者自己在模板頁面上設(shè)計(jì)的list查詢標(biāo)簽來分析mysql效率問題以及優(yōu)化建議
文檔最后更新時(shí)間:2018-05-28 13:04:29