fszaer
V2EX  ›  Redis

ioredis 中的 commands.js 有什么用?

  •  
  •   fszaer · Jul 25, 2015 · 4496 views
    This topic created in 3964 days ago, the information mentioned may be changed or developed.
    webstorm ctrl+左键 redis命令会跳转到这个文件,翻了一下像是命令说明
    但是有些不明所以
    求解惑
    4 replies    2015-07-25 23:43:53 +08:00
    scarlex
        1
    scarlex  
       Jul 25, 2015
    https://github.com/tj/commander.js
    是TJ写的这个东西,方便写命令行工具
    sox
        2
    sox  
       Jul 25, 2015 via Android
    @scarlex 然而你和楼主说得不是一个东西……
    scarlex
        3
    scarlex  
       Jul 25, 2015
    @sox 哈哈哈,原来看错了
    luin
        4
    luin  
       Jul 25, 2015
    commands.js 是通过 Redis 的 command 命令 (http://redis.io/commands/command) 生成的,用来告知 ioredis 要支持的 Redis 命令列表以及每个命令的属性。命令的属性则用来实现自动添加命名空间和在 Cluster 模式下计算 slot。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   4272 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 43ms · UTC 05:27 · PVG 13:27 · LAX 22:27 · JFK 01:27
    ♥ Do have faith in what you're doing.