* WinCache Interface for Discuz X2.5 (IIS Platform)
*
* $Id: memory_driver_wincache.php 2012-07-30 Created by Yang Wang (http://wangaiche.com)
*/
if(!defined('IN_DISCUZ')) {
exit('Access Denied');
}
class memory_driver_wincache
{
public function init($config) {
}
public function get($key) {
return wincache_ucache_get($key);
}
public function set($key, $value, $ttl = 0) {
return wincache_ucache_set($key, $value, $ttl);
}
public function rm($key) {
return wincache_ucache_delete($key);
}
public function clear() {
return wincache_ucache_clear();
}
public function inc($key, $step = 1) {
return wincache_ucache_inc($key, $step);
}
public function dec($key, $step = 1) {
return wincache_ucache_dec($key, $step);
}
}
?>
復(fù)制代碼
4、\config\config_global.php(修改)
$_config['memory']['eaccelerator'] = 1;
//下面這句是新增的,是控制wincache是否啟用;(1為啟用;0為不啟用)
$_config['memory']['wincache'] = 1;
復(fù)制代碼
上面的幾個(gè)修改文件,我們也做了打包了,放在115上了: http://115.com/file/e7k762tr#
[wangaiche.com]_WinCache support for Discuz X2.5.zip 注意:這里面沒(méi)有config_global.php文件,自己修改一下即可!
本文由玩改車(http://wangaiche.com)技術(shù)團(tuán)隊(duì)原創(chuàng),轉(zhuǎn)載請(qǐng)保留來(lái)源。