protected function createCM(array $params = array()) { $cm = new YiiCacheMutex(); foreach ($params as $k => $v) { $cm->{$k} = $v; } $cm->init(); return $cm; }
protected function unlock($handle) { if ($this->cacheMutex) { $this->cacheMutex->release($handle); } else { fclose($handle['handle']); if (file_exists($handle['file'])) { unlink($handle['file']); } } }