Пример #1
0
 /**
  * Deletes data
  *
  * @param string $key
  * @return boolean
  */
 function delete($key)
 {
     if (is_object($this->_memcached)) {
         return $this->_memcached->delete($key);
     }
     return false;
 }
Пример #2
0
         break;
     case "set":
         $key = array_shift($args);
         if ($args[0] == "#" && is_numeric($args[1])) {
             $value = str_repeat("*", $args[1]);
         } else {
             $value = implode(" ", $args);
         }
         if (!$mcc->set($key, $value, 0)) {
             #print 'Error: ' . $mcc->error_string() . "\n";
             print "MemCached error\n";
         }
         break;
     case "delete":
         $key = implode(" ", $args);
         if (!$mcc->delete($key)) {
             #print 'Error: ' . $mcc->error_string() . "\n";
             print "MemCached error\n";
         }
         break;
     case "dumpmcc":
         var_dump($mcc);
         break;
     case "quit":
     case "exit":
         $quit = true;
         break;
     default:
         $bad = true;
 }
 if ($bad) {
Пример #3
0
 /**
  * Releases the class mutex.
  * After the release other processes are able to block the mutex themselves.
  *
  * @access public
  * @return boolean
  */
 public function ReleaseMutex()
 {
     return $this->memcached->delete($this->typeMutex);
 }