Giter Site home page Giter Site logo

RESTORE命令变化 about redis HOT 2 CLOSED

huangzworks avatar huangzworks commented on July 17, 2024
RESTORE命令变化

from redis.

Comments (2)

huangzworks avatar huangzworks commented on July 17, 2024

谢谢提醒,一两个月之后文档会进行一次大更新,到时会一并修复这个问题。

你可以让这个 issue 保持打开状态,我会在文档更新完毕之后来关闭这个 issue 。

from redis.

huangzworks avatar huangzworks commented on July 17, 2024

Hi,经过在最新的 Redis 3.1 版本上进行实验,发现 REPLACE 选项虽然在打印命令帮助信息的时候不会出现在参数列表里面,但仍然是可用的:

127.0.0.1:6379> help
redis-cli 3.1.999 (git:bea12591)
Type: "help @<group>" to get a list of commands in <group>
      "help <command>" for help on <command>
      "help <tab>" to get a list of possible help topics
      "quit" to exit
127.0.0.1:6379> help RESTORE

  RESTORE key ttl serialized-value
  summary: Create a key using the provided serialized value, previously obtained using DUMP.
  since: 2.6.0
  group: generic

127.0.0.1:6379> SET msg "hello world"
OK
127.0.0.1:6379> DUMP msg
"\x00\x0bhello world\a\x00\xf4\xce\x9cJ\xae\ru."
127.0.0.1:6379> RESTORE new-msg 0 "\x00\x0bhello world\a\x00\xf4\xce\x9cJ\xae\ru." REPLACE
OK
127.0.0.1:6379> GET new-msg
"hello world"
127.0.0.1:6379> RESTORE new-msg 0 "\x00\x0bhello world\a\x00\xf4\xce\x9cJ\xae\ru." REPLACE
OK

因此我推测,不能使用 REPLACE 选项可能只是某个特定版本的问题,故关闭这个 issue 。

from redis.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.