# wget http://xcache.lighttpd.net/pub/Releases/1.3.0/xcache-1.3.0.tar.gz # tar zxvf xcache-1.3.0.tar.gz # cd xcache-1.3.0 # /usr/local/php/bin/phpize # ./configure --enable-xcache--enable-xcache-coverager --enable-xcache-optimizer--with-php-config=/usr/local/php/bin/php-config # make && make install
# vi /usr/local/php/lib/php.ini
extension_dir=/usr/local/php/include/php/ext [xcache-common] extension = xcache.so [xcache.admin] xcache.admin.enable_auth = On xcache.admin.user = "xcache" xcache.admin.pass = "" [xcache] xcache.shm_scheme ="mmap" xcache.size=60M xcache.count =1 xcache.slots =8K xcache.ttl=0 xcache.gc_interval =0 xcache.var_size=4M xcache.var_count =1 xcache.var_slots =8K xcache.var_ttl=0 xcache.var_maxttl=0 xcache.var_gc_interval =300 xcache.test =Off xcache.readonly_protection = On xcache.mmap_path ="/tmp/xcache" xcache.coredump_directory ="" xcache.cacher =On xcache.stat=On xcache.optimizer =Off [xcache.coverager] xcache.coverager =On xcache.coveragedump_directory =""
# touch /tmp/xcache# chmod 777 /tmp/xcache
# cp -a /tmp/xcache-1.3.0/admin//usr/local/nginx/html/
<?php
/**
* Xcache moudle
*/
class cacheHelper{
public $prefix;
function __construct(){
if(!function_exists('xcache_get')){
exit("This application must required XCache module.");
}
}
/**
* __set
*
* @param mixed $name
* @param mixed $value
* @access public
* @return void
*/
public function __set($name, $value){
xcache_set($this->prefix.$name, $value);
}
/**
* __get
*
* @param mixed $name
* @access public
* @return mixed
*/
public function __get($name){
return xcache_get($this->prefix.$name);
}
/**
* __isset
*
* @param mixed $name
* @access public
* @return bool
*/
public function __isset($name){
return xcache_isset($this->prefix.$name);
}
/**
* __unset
*
* @param mixed $name
* @access public
* @return void
*/
public function __unset($name){
xcache_unset($this->prefix.$name);
}
}
?>
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有