function __construct($cfg = array()) { parent::__construct($cfg); if (br($cfg, 'lifeTime')) { $this->setCacheLifeTime($cfg['lifeTime']); } }
function __construct($cfg = array()) { parent::__construct($cfg); if (br($cfg, 'cachePath')) { $this->setCachePath($cfg['cachePath']); } else { $this->setCachePath(br()->basePath() . '_tmp/_cache/'); } if (br($cfg, 'lifeTime')) { $this->setCacheLifeTime($cfg['lifeTime']); } }
function __construct($cfg = array()) { parent::__construct($cfg); $hostname = br($cfg, 'hostname', self::DefaultHostName); $port = br($cfg, 'port', self::DefaultPort); $this->memCache = new Memcache(); if (!$this->memCache->connect($hostname, $port)) { throw new BrException('Can not connect to MemCache server ' . $hostname . ':' . $port); } if (br($cfg, 'lifeTime')) { $this->setCacheLifeTime($cfg['lifeTime']); } }
function __construct($cfg = array()) { parent::__construct($cfg); }