$key = is_array($key) ? $key[1] : $key;
- $this->stats['delete']++;
+ @$this->stats['delete']++;
$cmd = "delete $key $time\r\n";
if(!fwrite($sock, $cmd, strlen($cmd)))
{
if ($this->_debug)
foreach ($val as $k => $v)
- $this->_debugprint(sprintf("MemCache: sock %s got %s => %s\r\n", $sock, $k, $v));
+ $this->_debugprint(@sprintf("MemCache: sock %s got %s => %s\r\n", serialize($sock), $k, $v));
- return $val[$key];
+ return @$val[$key];
}
// }}}
*/
function _hashfunc ($key)
{
- $hash = 0;
- for ($i=0; $i<strlen($key); $i++)
- {
- $hash = $hash*33 + ord($key[$i]);
- }
-
- return $hash;
+ return crc32($key);
}
// }}}