前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >discuz关闭缓存

discuz关闭缓存

作者头像
黄啊码
发布2020-05-31 22:28:24
4.2K0
发布2020-05-31 22:28:24
举报

修改 function_core.php 文件

代码语言:javascript
复制
vim  discuz_x3.2/upload/source/function/function_core.php

代码如下,添加红色字体

代码语言:javascript
复制
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-cache-clean-01
discuz-cache-clean-01

后台设置缓存

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

discuz-cache-clean-02
discuz-cache-clean-02

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

discuz-cache-clean-03
discuz-cache-clean-03

删除缓存文件

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

本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2016-08-16 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档