/** * Constructs a new CacheObject * * @param string Cache name * @param string Cache driver name (e.q. Serialize) */ public function __construct($name, CacheDriver $driver = null) { $this->name = $name; if ($driver === null) { $this->driver = CacheServer::getDriver(); } else { $this->driver = $driver; } $this->data = null; $this->maxAge = null; }
function MemcacheServer($options) { parent::__construct($options); /* 连接到缓存服务器 */ $this->connect($this->_options); }