Discuz提速优化技巧

Discuz的提速方法有很多,大体分为以下10条:

1.后台性能优化

2.延迟加载设置

3.开启GZIP

4.使用CDN

5.数据库优化

6.使用谷歌Pagespeed

7.模板优化

8.插件筛选

9.图片压缩

10.伪静态

这篇文章主要介绍第一部分“后台性能优化”。

Discuz的后台性能优化包括:论坛页面缓存设置、服务器优化和内存优化
————————————————

// --------------------------  CONFIG MEMORY  --------------------------- //
$_config['memory']['prefix'] = '7gCUyQ_';
$_config['memory']['redis']['server'] = '';
$_config['memory']['redis']['port'] = 6379;
$_config['memory']['redis']['pconnect'] = 1;
$_config['memory']['redis']['timeout'] = '0';
$_config['memory']['redis']['requirepass'] = '';
$_config['memory']['redis']['serializer'] = 1;
$_config['memory']['memcache']['server'] = '';
$_config['memory']['memcache']['port'] = 11211;
$_config['memory']['memcache']['pconnect'] = 1;
$_config['memory']['memcache']['timeout'] = 1;
$_config['memory']['apc'] = '0';
$_config['memory']['apcu'] = '1';
$_config['memory']['xcache'] = '0';
$_config['memory']['eaccelerator'] = '0';
$_config['memory']['wincache'] = '0';
$_config['memory']['yac'] = '0';
$_config['memory']['file']['server'] = 'data/threadcache';



$_config['memory']['memcached']['server'] = '127.0.0.1';
$_config['memory']['memcached']['port'] = 11211;
$_config['memory']['memcached']['pconnect'] = 1;
$_config['memory']['memcached']['timeout'] = 1;