用户名 密码 记住我 还未注册?

下载中心


下载中心

网站 : Xoops核心代码

speed up xoops by updating cache files in real time



 描述:
这是在xoops.org总站发布的一个hack
已经加入到xoops2.2中了
所以。。。没有必要再用了,等xoops2.2罢

总站告诉我原来的下载不能用了,让更新一下。我就顺便也放到这里罢

This is a revised download since the site url changed.
And it might be less vague if use the title of "cache on change"?
[July 20, 2004]

OBJECTIVES:
Make the cache system more flexible and more efficient
for different modules


HOWTO:
1 modify XOOPS_ROOT_PATH/kernel/module.php:
class XoopsModule extends XoopsObject
{
...
// clear module/block cache files
function clearCache()
{
// clear module cache files
// clear relevant block cache files
}

//Update the module cache
function updateCache()
{
$this->clearCache(); // clear module/block cache
files
// create module cache files TODO
// create block cache files DONE
}
}

2 call xoopsmodule::updatecache where necessary. For
instance, in the post.php of newbb module, add the
following right after notification handling:
global $xoopsModule; // not necessary for this
specific case
$xoopsModule->updateCache();

3 related configurations
(1) For a static module such as an article module, or a
dynamic module with no click or view stats: set the
relevant cache time parameters with a huge value, for
say 1 week, 1 month or even use cache_lifetime. In this
case, queries will only occur when new submission or
database update happens.

(2) For a dynamic module, such as forum: set relevant
cache time with a regular value. In this case, cache will
work in regular way if no update occurs but update can
take effect in real time once submission or update
happens.


4 BENEFITS
1 speed up xoops page loading by reducing queries

2 speed up xoops display update by using event-
triggered cache update


5 NOTE:
Alternatively, this hack can be made in
XOOPS_ROOT_PATH/class/template.php
as following:

1 update ROOT/class/template.php file

2 in corresponding module files, for instance:
ROOT/modules/newbb/post.php::
include_once XOOPS_ROOT_PATH . '/class/template.php';
...
just after $notification_handler->...
xoops_update_module_cache($xoopsModule);


HAS NOT BEEN FULLY TESTED YET.


more details available in case you are interested.



read the readme.txt plz.

提交者: D.J.
发布者: D.J.
更新于: Tue, 20-Jul-2004

版本: 
下载次数: 913
文件大小: 8.79 KB
网站: Xoops China
镜像网站: 未指明

评分:   (0 个投票)

点评:  (0)

下载时间估计:
Modem(56k) : 1s
ISDN(64k) : 1s
DSL(768k) : 0.10s
LAN(10M) : 0.01s


 

打印模式描述

价格: 免费 | 支持平台: Xoops 2.0 | 许可: 未指明 | 限制: 未指明

XOOPS China 用户点评
作第一个点评者.

其他文件: D.J.
XOOPS uploader 安全更新 (Mon, 01-Oct-2007)
Frameworks 1.20 for XOOPS (Mon, 27-Aug-2007)
XOOPS 2.0.17 简体中文版 (Mon, 27-Aug-2007)
phpMyadmin 2.10 (Thu, 12-Apr-2007)
Tag 模块 1.60 发布 (Thu, 04-Jan-2007)
dokuwiki 2.02 发布 (Thu, 04-Jan-2007)
CBB 3.08 论坛模块发布 (Wed, 03-Jan-2007)
Tag 模块 1.50 发布 (Fri, 01-Dec-2006)

speed up xoops by updating cache files in real time © 版权所有 2010 XOOPS China

网友个人意见,不代表本站立场。对于发言内容,由发表者自负责任。
发表者 树状展开