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