Orca mendukung perintah Redis versi 7.0 dan sebelumnya serta kompatibel dengan protokol RESP2 dan RESP3. Hanya perintah yang tercantum dalam tabel di bawah ini yang didukung; perintah lain tidak didukung. Orca mendukung hingga 16 database (DB0 hingga DB15), tetapi tidak mendukung perintah lintas-database seperti MOVE.
Kompatibilitas protokol Redis
| Category | Command | Supported |
|---|---|---|
| Bitmap | BITCOUNT | Supported |
| BITOP | Supported | |
| BITPOS | Supported | |
| SETBIT | Supported | |
| GETBIT | Supported | |
| Other commands | Not supported | |
| Connection management | PING | Supported |
| ECHO | Supported | |
| HELLO | Supported | |
| AUTH | Supported | |
| CLIENT | Partially supported | |
| Other commands | Not supported | |
| Generic | DEL | Supported |
| UNLINK | Supported | |
| EXISTS | Supported | |
| KEYS | Supported | |
| RENAME | Supported | |
| RENAMENX | Supported | |
| TYPE | Supported | |
| EXPIRE | Supported | |
| EXPIREAT | Supported | |
| EXPIRETIME | Supported | |
| PERSIST | Supported | |
| PEXPIRE | Supported | |
| PEXPIREAT | Supported | |
| PEXPIRETIME | Supported | |
| TTL | Supported | |
| PTTL | Supported | |
| RANDOMKEY | Supported | |
| DUMP | Supported | |
| RESTORE | Supported | |
| INFO | Supported | |
| SCAN | Supported | |
| Other commands | Not supported | |
| Geospatial indices | GEOADD | Supported |
| GEODIST | Supported | |
| GEOHASH | Supported | |
| GEOPOS | Supported | |
| GEORADIUS | Supported | |
| GEORADIUS_RO | Supported | |
| GEORADIUSBYMEMBER | Supported | |
| GEORADIUSBYMEMBER_RO | Supported | |
| GEOSEARCH | Supported | |
| GEOSEARCHSTORE | Supported | |
| Hash | HDEL | Supported |
| HEXISTS | Supported | |
| HGET | Supported | |
| HGETALL | Supported | |
| HINCRBY | Supported | |
| HINCRBYFLOAT | Supported | |
| HKEYS | Supported | |
| HLEN | Supported | |
| HMGET | Supported | |
| HMSET | Supported | |
| HSET | Supported | |
| HSETNX | Supported | |
| HRANDFIELD | Supported | |
| HVALS | Supported | |
| HSTRLEN | Supported | |
| HSCAN | Supported | |
| HEXPIRE | Supported | |
| HEXPIREAT | Supported | |
| HEXPIRETIME | Supported | |
| HPERSIST | Supported | |
| HPEXPIRE | Supported | |
| HPEXPIREAT | Supported | |
| HPEXPIRETIME | Supported | |
| HTTL | Supported | |
| HPTTL | Supported | |
| Other commands | Not supported | |
| HyperLogLog | PFADD | Supported |
| PFCOUNT | Supported | |
| PFMERGE | Supported | |
| PFSELFTEST | Not supported | |
| PFDEBUG | Not supported | |
| List | LINDEX | Supported |
| LINSERT | Supported | |
| LLEN | Supported | |
| LMOVE | Supported | |
| LMPOP | Supported | |
| LPOP | Supported | |
| LPOS | Supported | |
| LPUSH | Supported | |
| LPUSHX | Supported | |
| LRANGE | Supported | |
| LREM | Supported | |
| LSET | Supported | |
| LTRIM | Supported | |
| RPOP | Supported | |
| RPOPLPUSH | Supported | |
| RPUSH | Supported | |
| RPUSHX | Supported | |
| BLPOP | Supported | |
| BRPOP | Supported | |
| Other commands | Not supported | |
| Pub/Sub | PSUBSCRIBE | Supported |
| PUBLISH | Supported | |
| PUBSUB CHANNELS | Supported | |
| PUBSUB NUMPAT | Supported | |
| PUBSUB NUMSUB | Supported | |
| PUNSUBSCRIBE | Supported | |
| SUBSCRIBE | Supported | |
| UNSUBSCRIBE | Supported | |
| Other commands | Not supported | |
| Server management | DBSIZE | Supported |
| FLUSHALL | Supported | |
| FLUSHDB | Supported | |
| Other commands | Not supported | |
| Set | SADD | Supported |
| SCARD | Supported | |
| SDIFF | Supported | |
| SDIFFSTORE | Supported | |
| SINTER | Supported | |
| SINTERCARD | Supported | |
| SINTERSTORE | Supported | |
| SISMEMBER | Supported | |
| SMEMBERS | Supported | |
| SMISMEMBER | Supported | |
| SMOVE | Supported | |
| SREM | Supported | |
| SUNION | Supported | |
| SUNIONSTORE | Supported | |
| SPOP | Supported | |
| SRANDMEMBER | Supported | |
| SSCAN | Supported | |
| Other commands | Not supported | |
| Sorted set | ZADD | Supported |
| ZCARD | Supported | |
| ZCOUNT | Supported | |
| ZDIFF | Supported | |
| ZDIFFSTORE | Supported | |
| ZINCRBY | Supported | |
| ZINTERCARD | Supported | |
| ZINTERSTORE | Supported | |
| ZLEXCOUNT | Supported | |
| ZMPOP | Supported | |
| ZMSCORE | Supported | |
| ZPOPMAX | Supported | |
| ZPOPMIN | Supported | |
| ZRANGE | Supported | |
| ZRANGEBYLEX | Supported | |
| ZRANGEBYSCORE | Supported | |
| ZRANGESTORE | Supported | |
| ZRANK | Supported | |
| ZREM | Supported | |
| ZREMRANGEBYLEX | Supported | |
| ZREMRANGEBYRANK | Supported | |
| ZREMRANGEBYSCORE | Supported | |
| ZREVRANGE | Supported | |
| ZREVRANGEBYLEX | Supported | |
| ZREVRANGEBYSCORE | Supported | |
| ZREVRANK | Supported | |
| ZSCORE | Supported | |
| ZUNION | Supported | |
| ZUNIONSTORE | Supported | |
| ZRANDMEMBER | Supported | |
| ZSCAN | Supported | |
| Other commands | Not supported | |
| String | APPEND | Supported |
| DECR | Supported | |
| DECRBY | Supported | |
| GET | Supported | |
| GETDEL | Supported | |
| GETEX | Supported | |
| GETRANGE | Supported | |
| GETSET | Supported | |
| LCS | Supported | |
| INCR | Supported | |
| INCRBY | Supported | |
| INCRBYFLOAT | Supported | |
| MGET | Supported | |
| MSET | Supported | |
| MSETNX | Supported | |
| PSETEX | Supported | |
| SET | Supported | |
| SETEX | Supported | |
| SETNX | Supported | |
| SETRANGE | Supported | |
| STRLEN | Supported | |
| SUBSTR | Supported | |
| Stream | XADD | Supported |
| XDEL | Supported | |
| XLEN | Supported | |
| XRANGE | Supported | |
| XREAD | Supported | |
| XREVRANGE | Supported | |
| XSETID | Supported | |
| XTRIM | Supported | |
| XACK | Supported | |
| XGROUP | Supported | |
| XINFO | Supported | |
| XPENDING | Supported | |
| XREADGROUP | Supported | |
| XAUTOCLAIM | Supported | |
| XCLAIM | Supported | |
| XACKDEL | Not supported | |
| XCFGSET | Not supported | |
| XDELEX | Not supported | |
| XIDMPRECORD | Not supported | |
| XNACK | Not supported | |
| Scripting | EVAL | Supported |
| EVAL_RO | Supported | |
| EVALSHA | Supported | |
| EVALSHA_RO | Supported | |
| SCRIPT LOAD | Supported | |
| SCRIPT EXISTS | Supported | |
| SCRIPT KILL | Supported | |
| SCRIPT FLUSH | Supported |
Untuk penggunaan skrip Lua, lihat Petunjuk penggunaan skrip Lua.
Catatan penggunaan
HELLO
-
Penggunaan: Sama seperti Redis.
-
Nilai kembalian: Berbeda. Orca hanya mengembalikan
serverdanproto.
AUTH
-
Penggunaan: Berbeda.
-
Redis:
AUTH [username] password— parameterusernamebersifat opsional. -
Orca:
AUTH username password— parameterusernamewajib disertakan.
-
-
Nilai kembalian: Sama seperti Redis.
CLIENT
Hanya subperintah GETNAME, SETNAME, ID, INFO, LIST, dan HELP yang didukung. Subperintah lain tidak didukung.
FLUSHALL
-
Penggunaan: Berbeda.
-
Redis:
FLUSHALL [ASYNC | SYNC]— parameterASYNCatauSYNCbersifat opsional. -
Orca:
FLUSHALL— tidak ada parameter yang didukung.
-
-
Nilai kembalian: Sama seperti Redis.
FLUSHDB
-
Penggunaan: Berbeda.
-
Redis:
FLUSHDB [ASYNC | SYNC]— parameterASYNCatauSYNCbersifat opsional. -
Orca:
FLUSHDB— tidak ada parameter yang didukung.
-
-
Nilai kembalian: Sama seperti Redis.
Batasan status Pub/Sub
Klien dalam status SUBSCRIBE hanya dapat menjalankan perintah PING, SUBSCRIBE, PSUBSCRIBE, UNSUBSCRIBE, dan PUNSUBSCRIBE. Perintah lain tidak didukung dalam status ini.
ZRANGE
Penggunaan: ZRANGE key start stop [BYSCORE | BYLEX] [REV] [LIMIT offset count] [WITHSCORES]. Ketika BYLEX ditentukan, perilaku pengurutan mengikuti ZRANGEBYLEX.
Pengurutan leksikografis pada Sorted Sets
Perintah berikut menggunakan pengurutan leksikografis: ZLEXCOUNT, ZRANGEBYLEX, ZREMRANGEBYLEX, dan ZREVRANGEBYLEX.
Pengurutan leksikografis hanya berlaku jika semua elemen dalam Sorted Set memiliki skor yang sama. Jika skor berbeda, urutan elemen yang dikembalikan tidak terdefinisi, dan Orca serta Redis mungkin menunjukkan perilaku yang tidak konsisten.
Batasan panjang kunci
Redis membatasi setiap kunci hingga 512 MB. Orca menaikkan batasan ini menjadi 4 GB.
Untuk performa optimal, gunakan string dengan panjang tidak lebih dari 2.560 byte sebagai kunci.