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); } }
时间: 2024-10-17 02:38:31