redis為啥不使用長連接 phpredis長連接多久會(huì)斷?
phpredis長連接多久會(huì)斷?$redis->connect($host,$port,$timeout)的最后一個(gè)參數(shù)是超時(shí)時(shí)間。除非關(guān)閉或斷開服務(wù)器,否則長連接不會(huì)斷開。此時(shí),您可以捕獲錯(cuò)誤,
phpredis長連接多久會(huì)斷?
$redis->connect($host,$port,$timeout)的最后一個(gè)參數(shù)是超時(shí)時(shí)間。除非關(guān)閉或斷開服務(wù)器,否則長連接不會(huì)斷開。此時(shí),您可以捕獲錯(cuò)誤,然后重新連接