国产+高潮+在线,国产 av 仑乱内谢,www国产亚洲精品久久,51国产偷自视频区视频,成人午夜精品网站在线观看

webman的Redis擴(kuò)展無(wú)法設(shè)置過期時(shí)間?

Mr_Deng

截圖
如圖,redis版本是phpstudy下載的
截圖

3981 2 1
2個(gè)回答

Mr_Deng

我知道了,有個(gè)expire方法,和原始操作不一樣

  • 暫無(wú)評(píng)論
小陽(yáng)光

在依賴是 "illuminate/redis": "^7.26"的情況下

文檔是有問題的,第三個(gè)參數(shù)不是 timeout
$userInfo = Redis::set('test','mytest','EX',10);這樣才對(duì),這樣設(shè)置過期時(shí)間是10秒

下面是對(duì)的
public function set($key, $value, $expireResolution = null, $expireTTL = null, $flag = null)

第一個(gè)參數(shù) 和第二個(gè)參數(shù)不用講

expireResolution 是過期策略,比如
EX seconds -- Set the specified expire time, in seconds. 秒
PX milliseconds -- Set the specified expire time, in milliseconds. 毫秒
NX -- Only set the key if it does not already exist. 不存在則設(shè)置
XX -- Only set the key if it already exist. 存在則設(shè)置

第四個(gè)參數(shù)是
expireTTL 過期時(shí)間

  • Mr_Deng 2020-09-06

    確實(shí)如此,請(qǐng)問文檔在哪里能看到?

  • 小陽(yáng)光 2020-09-06

    \webman\support\bootstrap\Redis.php 中的 * @method static bool set 參數(shù)有問題,給人誤解

  • walkor 2020-09-07

    感謝反饋,文檔已經(jīng)修復(fù)

年代過于久遠(yuǎn),無(wú)法發(fā)表回答
??