1
cache_set($id, 'cache', serialize($my_data), time() + 360);
cache_set語法問題
我正在如上設置緩存。但是,它不會爲指定的1天的unix時間戳設置緩存。 $id = id of the cache; $my_data = data to be cached; 'cache' = table where it is stored; time() + 360 = unix timestamp;
所以最後,正確的語法應爲cache_set($id,$data,'cache',time()+(24*60*60))
但這不更新緩存表。操作cache_get($id)
也不會執行。
有一天?這是你要求的6分鐘。 – chx 2011-02-18 12:33:31
我的道歉,它應該是時間()+(60 * 60 * 24) – user550265 2011-02-18 12:33:31