首页 > 系统服务 > 详细

memcache_helper

时间:2015-12-20 00:35:07      阅读:179      评论:0      收藏:0      [点我收藏+]
class memcache_helper extends memcache {

    private $host = "127.0.0.1";
    private $port = "11211";

    public function __construct() {
        $ret = parent::connect($this->host, $this->port);
        if (!$ret) {
            die("conn failed");
        }
    }

    public function add($key = "", $value = "", $flag = false, $expire = 0) {
        return parent:: add($key, $value, $flag, $expire);
    }

    public function set($key = "", $value = "", $flag = false, $expire = 0) {
        return parent:: set($key, $value, $flag, $expire);
    }

    public function delete($key, $expire = 0) {
        parent::delete($key, $expire);
    }

    public function flush() {
        parent::flush();
    }

    public function get($key) {
        parent::get($key);
    }

    public function replace($key, $value, $flag = false, $expire = 0) {
        parent::replace($key, $value, $flag, $expire);
    }

}
 

 

memcache_helper

原文:http://www.cnblogs.com/objectboy/p/5060068.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!