0
点赞
收藏
分享

微信扫一扫

discuz关闭缓存


修改 function_core.php 文件

vim  discuz_x3.2/upload/source/function/function_core.php

代码如下,添加红色字体

function checktplrefresh($maintpl, $subtpl, $timecompare, $templateid, $cachefile, $tpldir, $file) {
static $tplrefresh, $timestamp, $targettplname;
if($tplrefresh === null) {
$tplrefresh = getglobal(‘config/output/tplrefresh’);
$timestamp = getglobal(‘timestamp’);
} //关闭缓存
if(1 || empty($timecompare) || $tplrefresh == 1 || ($tplrefresh > 1 && !($timestamp % $tplrefresh))) {
if(1 || empty($timecompare) || @filemtime(DISCUZ_ROOT.$subtpl) > $timecompare) {
require_once DISCUZ_ROOT.’/source/class/class_template.php';
$template = new template();
$template->parse_template($maintpl, $templateid, $tpldir, $file, $cachefile);

 

后台更新缓存

后台管理 ——》工具 ——》 选择更新缓存

此处仅仅是更新缓存,无法删除缓存

​​

discuz关闭缓存_后台管理

​​

 

后台设置缓存

后台管理 ——》 全局 ——》 性能优化 ——》 内存优化 ——》 ”内存优化功能设置“ ——》 ”关闭“缓存一些功能

​​

discuz关闭缓存_缓存_02

​​

 

后台管理 ——》 全局 ——》 性能优化 ——》 论坛页面缓存设置 ——》 ”缓存系数“ ——》 设置为”0″,关闭缓存

​​

discuz关闭缓存_php_03

​​

 

删除缓存文件

上图中,显示了缓存文件在“data/threadcache/” 目录下,因此登陆服务器,用控制台删除缓存文件

举报

相关推荐

0 条评论