設(shè)置緩存數(shù)據(jù)過期時(shí)間
更新時(shí)間:
關(guān)于設(shè)置緩存數(shù)據(jù)的過期時(shí)間,可以參考以下Memcached官方說明:
An expiration time, in seconds. Can be up to 30 days. After 30 days, is treated as a unix timestamp of an exact date.
即:0~2592000表示從當(dāng)前時(shí)刻算起的時(shí)間長(zhǎng)度(以秒計(jì)算,最長(zhǎng)2592000即30天);大于2592000表示UNIX時(shí)間戳。
此值設(shè)置為0表明此數(shù)據(jù)不會(huì)主動(dòng)過期,但仍可能因數(shù)據(jù)逐出等原因?qū)е麓藬?shù)據(jù)失效。
Expire參數(shù) | 說明 |
---|---|
0 | 此值設(shè)置為0表明此數(shù)據(jù)不會(huì)主動(dòng)過期,但仍可能因數(shù)據(jù)逐出等原因?qū)е麓藬?shù)據(jù)失效。 |
<=2592000秒(30天) | 以當(dāng)前時(shí)間為起點(diǎn)的相對(duì)時(shí)間。 |
>2592000 | 從1970-01-01 00:00:00開始的秒數(shù)表示的絕對(duì)時(shí)間。 |
文檔內(nèi)容是否對(duì)您有幫助?