예제 #1
0
 public function save(array $data)
 {
     if ($this->__testForApc() === false) {
         return false;
     }
     if (apc_add(parent::getName(), serialize($data), parent::getTimeToLive()) === false) {
         return false;
     }
     return true;
 }
예제 #2
0
 public function save(array $data)
 {
     if (apc_add(parent::getName(), serialize($data), parent::getTimeToLive()) === false) {
         # logging me hearties
         # logging me hearties
         $types = parent::getTypes();
         $urgency = parent::getUrgency();
         parent::writeLog($types['error'], $urgency['high'], 'Could not successfully save to cache', 'APC Cache info: ' . PHP_EOL . serialize(apc_cache_info()));
         return false;
     }
     return true;
 }
예제 #3
0
 private function _testForCacheDataTable()
 {
     $query = (string) "describe `" . parent::getName() . "`;";
     if (self::query($query, false) === false) {
         return false;
     }
     return true;
 }