0
它在我保存簡單字符串時起作用。當我保存查詢結果時,它會返回true,但我無法再從緩存中讀取它。Memcache:爲什麼我找不到查詢結果
這裏是我的代碼:
$cachekey=md5('mqv_'.$connections[$ccn][5].mysql_result($r,$u,'Tablechoice').$e1.$e2.$e3.$e4.$_SESSION["auszug1"].$_SESSION["per_page1"]);
if($rv = $memcache->get($cachekey)){
$cachemsg="data from cache: ".$rv;
}else{
$rv=mysql_query($qc,$link); print mysql_error($link);
if($memcache->add($cachekey,$rv,false,60)){
$cachemsg="data saved".$memcache->getServerStatus('localhost', 11211);
}
}
if($debug==1){print $cachemsg;}
感謝您的幫助
歡迎光臨!我格式化了你的代碼。看看「如何格式化」,這是在每個編輯窗口右上角,這很容易(你也可以編輯你自己的問題)。 – Abel 2010-07-27 08:20:23
謝謝,在我的下一篇文章中,我將自己設計我的代碼 – Martin 2010-07-27 08:44:30