<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                企業??AI智能體構建引擎,智能編排和調試,一鍵部署,支持知識庫和私有化部署方案 廣告
                # RESTORE **RESTORE key ttl serialized-value [REPLACE]** 反序列化給定的序列化值,并將它和給定的 `key` 關聯。 參數 `ttl` 以毫秒為單位為 `key` 設置生存時間;如果 `ttl` 為 `0` ,那么不設置生存時間。 [RESTORE](#restore) 在執行反序列化之前會先對序列化值的 RDB 版本和數據校驗和進行檢查,如果 RDB 版本不相同或者數據不完整的話,那么 [RESTORE](#restore) 會拒絕進行反序列化,并返回一個錯誤。 如果鍵 `key` 已經存在, 并且給定了 `REPLACE` 選項, 那么使用反序列化得出的值來代替鍵 `key` 原有的值; 相反地, 如果鍵 `key` 已經存在, 但是沒有給定 `REPLACE` 選項, 那么命令返回一個錯誤。 更多信息可以參考 [_DUMP_](dump.html) 命令。 **可用版本:** &gt;= 2.6.0 **時間復雜度:** 查找給定鍵的復雜度為 O(1) ,對鍵進行反序列化的復雜度為 O(N*M) ,其中 N 是構成 `key` 的 Redis 對象的數量,而 M 則是這些對象的平均大小。有序集合(sorted set)的反序列化復雜度為 O(N*M*log(N)) ,因為有序集合每次插入的復雜度為 O(log(N)) 。如果反序列化的對象是比較小的字符串,那么復雜度為 O(1) 。 **返回值:** 如果反序列化成功那么返回 `OK` ,否則返回一個錯誤。 ``` # 創建一個鍵,作為 DUMP 命令的輸入 redis> SET greeting "hello, dumping world!" OK redis> DUMP greeting "\x00\x15hello, dumping world!\x06\x00E\xa0Z\x82\xd8r\xc1\xde" # 將序列化數據 RESTORE 到另一個鍵上面 redis> RESTORE greeting-again 0 "\x00\x15hello, dumping world!\x06\x00E\xa0Z\x82\xd8r\xc1\xde" OK redis> GET greeting-again "hello, dumping world!" # 在沒有給定 REPLACE 選項的情況下,再次嘗試反序列化到同一個鍵,失敗 redis> RESTORE greeting-again 0 "\x00\x15hello, dumping world!\x06\x00E\xa0Z\x82\xd8r\xc1\xde" (error) ERR Target key name is busy. # 給定 REPLACE 選項,對同一個鍵進行反序列化成功 redis> RESTORE greeting-again 0 "\x00\x15hello, dumping world!\x06\x00E\xa0Z\x82\xd8r\xc1\xde" REPLACE OK # 嘗試使用無效的值進行反序列化,出錯 redis> RESTORE fake-message 0 "hello moto moto blah blah" (error) ERR DUMP payload version or checksum are wrong ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看