NCache RESP Server is a Redis RESP Protocol compatible server that runs natively on Windows as an in-memory distributed cache. This page documents the Redis RESP Protocol commands that NCache RESP Server supports.
The simplest Redis data type. Stores a single value under a key, typically text, numbers, serialized objects, or binary data. Includes basic get/set operations, counters, ranges, conditional sets, and expiration-aware variants.
| Type | RESP Command | StackExchange.Redis (.NET) | Jedis (Java) | redis-py (Python) | node-redis (Node.js) | NCache OSS |
|---|---|---|---|---|---|---|
| String | APPEND key value | StringAppend() | append() | append() | append() | |
| String | DECR key | StringDecrement(key) | decr() | decr() | decr() | |
| String | DECRBY key decrement | StringDecrement(key,value) | decrBy() | decrby() | decrBy() | |
| String | GET key | StringGet() | get() | get() | get() | |
| String | INCR key | StringIncrement(key) | incr() | incr() | incr() | |
| String | INCRBY key increment | StringIncrement(key,long) | incrBy() | incrby() | incrBy() | |
| String | INCRBYFLOAT key increment | StringIncrement(key,double) | incrByFloat() | incrbyfloat() | incrByFloat() | |
| String | MGET key [key ...] | StringGet(keys[]) | mget() | mget() | mGet() | |
| String | MSET key value [key value ...] | StringSet(KeyValuePair[]) | mset() | mset() | mSet() | |
| String | SET key value [options] | StringSet() | set() | set() | set() | |
| String | STRLEN key | StringLength() | strlen() | strlen() | strLen() | |
| String | GETDEL key | StringGetDelete() | getDel() | getdel() | getDel() | |
| String | GETEX key [EX/PX/EXAT/PXAT/PERSIST] | StringGetSetExpiry() | getEx() | getex() | getEx() | |
| String | GETRANGE key start end | StringGetRange() | getrange() | getrange() | getRange() | |
| String | GETSET key value | StringGetSet() | getSet() | getset() | getSet() | |
| String | MSETNX key value [key value ...] | raw / StringSet semantics | msetnx() | msetnx() | mSetNX() | |
| String | PSETEX key milliseconds value | StringSet(...,expiry) | psetex() | psetex() | pSetEx() | |
| String | SETEX key seconds value | StringSet(...,expiry) | setex() | setex() | setEx() | |
| String | SETNX key value | StringSet(...,When.NotExists) | setnx() | setnx() | setNX() | |
| String | SETRANGE key offset value | StringSetRange() | setrange() | setrange() | setRange() | |
| String | LCS key1 key2 [options] | Execute("LCS",...) | lcs() / raw | lcs() | lcs() / raw | |
| String | SUBSTR key start end | StringGetRange() / raw | substr() / getrange() | substr() / getrange() | raw |
Commands that operate on keys regardless of the value type. Used for existence checks, deletion, expiration, renaming, scanning, copying, persistence-related operations, and key metadata.
| Type | RESP Command | StackExchange.Redis (.NET) | Jedis (Java) | redis-py (Python) | node-redis (Node.js) | NCache OSS |
|---|---|---|---|---|---|---|
| Key | DEL key [key ...] | KeyDelete() | del() | delete() | del() | |
| Key | EXISTS key [key ...] | KeyExists() | exists() | exists() | exists() | |
| Key | EXPIRE key seconds [NX/XX/GT/LT] | KeyExpire() | expire() | expire() | expire() | |
| Key | PERSIST key | KeyPersist() | persist() | persist() | persist() | |
| Key | PEXPIRE key milliseconds [options] | KeyExpire() | pexpire() | pexpire() | pExpire() | |
| Key | PTTL key | KeyTimeToLive() | pttl() | pttl() | pTTL() | |
| Key | TTL key | KeyTimeToLive() | ttl() | ttl() | ttl() | |
| Key | TYPE key | KeyType() | type() | type() | type() | |
| Key | EXPIREAT key timestamp [options] | KeyExpire(DateTime) | expireAt() | expireat() | expireAt() | |
| Key | PEXPIREAT key ms-timestamp [options] | KeyExpire(DateTime) | pexpireAt() | pexpireat() | pExpireAt() | |
| Key | RENAME key newkey | KeyRename() | rename() | rename() | rename() | |
| Key | RENAMENX key newkey | KeyRename(...,When.NotExists) | renamenx() | renamenx() | renameNX() | |
| Key | TOUCH key [key ...] | KeyTouch() | touch() | touch() | touch() | |
| Key | UNLINK key [key ...] | raw | unlink() | unlink() | unlink() | |
| Key | COPY source destination [DB db] [REPLACE] | KeyCopy() / raw | copy() | copy() | copy() | |
| Key | DUMP key | KeyDump() | dump() | dump() | dump() | |
| Key | EXPIRETIME key | raw | expireTime() / raw | expiretime() | expireTime() | |
| Key | OBJECT subcommand key | raw | object APIs / raw | object() | raw | |
| Key | PEXPIRETIME key | raw | raw | pexpiretime() | pExpireTime() | |
| Key | RANDOMKEY | KeyRandom() | randomKey() | randomkey() | randomKey() | |
| Key | RESTORE key ttl serialized-value [options] | KeyRestore() | restore() | restore() | restore() | |
| Key | SORT key [options] | Sort() | sort() | sort() | sort() | |
| Key | SORT_RO key [options] | raw | raw | sort_ro() | raw |
Stores a collection of field/value pairs under one key, similar to an object or dictionary. Useful for representing structured records such as users, sessions, or configuration objects without serializing the entire object as one string.
| Type | RESP Command | StackExchange.Redis (.NET) | Jedis (Java) | redis-py (Python) | node-redis (Node.js) |
|---|---|---|---|---|---|
| Hash | HDEL key field [field ...] | HashDelete() | hdel() | hdel() | hDel() |
| Hash | HEXISTS key field | HashExists() | hexists() | hexists() | hExists() |
| Hash | HGET key field | HashGet() | hget() | hget() | hGet() |
| Hash | HGETALL key | HashGetAll() | hgetAll() | hgetall() | hGetAll() |
| Hash | HINCRBY key field increment | HashIncrement(...,long) | hincrBy() | hincrby() | hIncrBy() |
| Hash | HINCRBYFLOAT key field increment | HashIncrement(...,double) | hincrByFloat() | hincrbyfloat() | hIncrByFloat() |
| Hash | HLEN key | HashLength() | hlen() | hlen() | hLen() |
| Hash | HMGET key field [field ...] | HashGet(fields[]) | hmget() | hmget() | hmGet() |
| Hash | HSET key field value [field value ...] | HashSet() | hset() | hset() | hSet() |
| Hash | HKEYS key | HashKeys() | hkeys() | hkeys() | hKeys() |
| Hash | HSCAN key cursor [MATCH] [COUNT] | HashScan() | hscan() | hscan() | hScan() |
| Hash | HSETNX key field value | HashSet(...,When.NotExists) | hsetnx() | hsetnx() | hSetNX() |
| Hash | HSTRLEN key field | HashStringLength() | hstrlen() | hstrlen() | hStrLen() |
| Hash | HVALS key | HashValues() | hvals() | hvals() | hVals() |
| Hash | HRANDFIELD key [count [WITHVALUES]] | HashRandomField() | hrandfield() | hrandfield() | hRandField() |
| Hash | HEXPIRE key seconds ... FIELDS ... | raw | raw/new API | hexpire() | raw/new API |
| Hash | HEXPIREAT key timestamp ... | raw | raw/new API | hexpireat() | raw/new API |
| Hash | HEXPIRETIME key FIELDS ... | raw | raw | hexpiretime() / raw | raw |
| Hash | HGETDEL key FIELDS ... | raw | raw | hgetdel() / raw | raw |
| Hash | HGETEX key ... FIELDS ... | raw | raw | hgetex() / raw | raw |
| Hash | HMSET key field value [field value ...] | HashSet() / raw | hmset() | legacy hmset() | hSet() / raw |
| Hash | HPERSIST key FIELDS ... | raw | raw | hpersist() | raw |
| Hash | HPEXPIRE key ms ... FIELDS ... | raw | raw/new API | hpexpire() | raw/new API |
| Hash | HPEXPIREAT key ms-timestamp ... | raw | raw/new API | hpexpireat() | raw/new API |
| Hash | HPEXPIRETIME key FIELDS ... | raw | raw | hpexpiretime() / raw | raw |
| Hash | HPTTL key FIELDS ... | raw | raw/new API | hpttl() | raw/new API |
| Hash | HSETEX key ... FIELDS ... | raw | raw | hsetex() / raw | raw |
| Hash | HTTL key FIELDS ... | raw | raw/new API | httl() | raw/new API |
An ordered sequence of values. Supports pushing and popping from either end, indexed access, ranges, trimming, moving items between lists, and blocking operations. Commonly used for queues and work lists.
| Type | RESP Command | StackExchange.Redis (.NET) | Jedis (Java) | redis-py (Python) | node-redis (Node.js) |
|---|---|---|---|---|---|
| List | LLEN key | ListLength() | llen() | llen() | lLen() |
| List | LPOP key [count] | ListLeftPop() | lpop() | lpop() | lPop() |
| List | LPUSH key element [element ...] | ListLeftPush() | lpush() | lpush() | lPush() |
| List | LRANGE key start stop | ListRange() | lrange() | lrange() | lRange() |
| List | RPOP key [count] | ListRightPop() | rpop() | rpop() | rPop() |
| List | RPUSH key element [element ...] | ListRightPush() | rpush() | rpush() | rPush() |
| List | LINDEX key index | ListGetByIndex() | lindex() | lindex() | lIndex() |
| List | LINSERT key BEFORE|AFTER pivot element | ListInsertBefore/After() | linsert() | linsert() | lInsert() |
| List | LPOS key element [options] | ListPosition() | lpos() | lpos() | lPos() |
| List | LPUSHX key element [element ...] | ListLeftPush(...,When.Exists) | lpushx() | lpushx() | lPushX() |
| List | LREM key count element | ListRemove() | lrem() | lrem() | lRem() |
| List | LSET key index element | ListSetByIndex() | lset() | lset() | lSet() |
| List | LTRIM key start stop | ListTrim() | ltrim() | ltrim() | lTrim() |
| List | RPUSHX key element [element ...] | ListRightPush(...,When.Exists) | rpushx() | rpushx() | rPushX() |
| List | BLMOVE source destination ... timeout | raw | blmove() | blmove() | blMove() |
| List | BLMPOP timeout numkeys key... LEFT|RIGHT [COUNT count] | raw | blmpop() | blmpop() | blmPop() |
| List | BLPOP key [key ...] timeout | raw | blpop() | blpop() | blPop() |
| List | BRPOP key [key ...] timeout | raw | brpop() | brpop() | brPop() |
| List | BRPOPLPUSH source destination timeout | raw | brpoplpush() | brpoplpush() | raw/legacy API |
| List | LMOVE source destination LEFT|RIGHT LEFT|RIGHT | ListMove() | lmove() | lmove() | lMove() |
| List | LMPOP numkeys key... LEFT|RIGHT [COUNT count] | raw | lmpop() | lmpop() | lmPop() |
| List | RPOPLPUSH source destination | ListRightPopLeftPush() | rpoplpush() | rpoplpush() | raw/legacy API |
An unordered collection of unique values. Supports membership checks, random selection, and set operations such as union, intersection, and difference. Useful for tags, memberships, and unique collections.
| Type | RESP Command | StackExchange.Redis (.NET) | Jedis (Java) | redis-py (Python) | node-redis (Node.js) |
|---|---|---|---|---|---|
| Set | SADD key member [member ...] | SetAdd() | sadd() | sadd() | sAdd() |
| Set | SCARD key | SetLength() | scard() | scard() | sCard() |
| Set | SISMEMBER key member | SetContains() | sismember() | sismember() | sIsMember() |
| Set | SMEMBERS key | SetMembers() | smembers() | smembers() | sMembers() |
| Set | SREM key member [member ...] | SetRemove() | srem() | srem() | sRem() |
| Set | SDIFF key [key ...] | SetCombine(Difference) | sdiff() | sdiff() | sDiff() |
| Set | SINTER key [key ...] | SetCombine(Intersect) | sinter() | sinter() | sInter() |
| Set | SMISMEMBER key member [member ...] | SetContains(values[]) / raw | smismember() | smismember() | smIsMember() |
| Set | SMOVE source destination member | SetMove() | smove() | smove() | sMove() |
| Set | SPOP key [count] | SetPop() | spop() | spop() | sPop() |
| Set | SRANDMEMBER key [count] | SetRandomMember(s) | srandmember() | srandmember() | sRandMember() |
| Set | SSCAN key cursor [MATCH] [COUNT] | SetScan() | sscan() | sscan() | sScan() |
| Set | SUNION key [key ...] | SetCombine(Union) | sunion() | sunion() | sUnion() |
| Set | SDIFFSTORE destination key [key ...] | SetCombineAndStore(Difference) | sdiffstore() | sdiffstore() | sDiffStore() |
| Set | SINTERCARD numkeys key... [LIMIT limit] | raw | sintercard() | sintercard() | sInterCard() |
| Set | SINTERSTORE destination key [key ...] | SetCombineAndStore(Intersect) | sinterstore() | sinterstore() | sInterStore() |
| Set | SUNIONSTORE destination key [key ...] | SetCombineAndStore(Union) | sunionstore() | sunionstore() | sUnionStore() |
An append-oriented event/message data structure. Supports ordered entries, IDs, range reads, blocking reads, consumer groups, acknowledgements, pending messages, and message claiming. Commonly used for event processing and durable messaging.
| Type | RESP Command | StackExchange.Redis (.NET) | Jedis (Java) | redis-py (Python) | node-redis (Node.js) |
|---|---|---|---|---|---|
| Stream | XADD key ID field value [field value ...] | StreamAdd() | xadd() | xadd() | xAdd() |
| Stream | XLEN key | StreamLength() | xlen() | xlen() | xLen() |
| Stream | XRANGE key start end [COUNT count] | StreamRange() | xrange() | xrange() | xRange() |
| Stream | XREAD [COUNT] [BLOCK] STREAMS key... id... | StreamRead() | xread() | xread() | xRead() |
| Stream | XREVRANGE key end start [COUNT count] | descending stream range | xrevrange() | xrevrange() | xRevRange() |
| Stream | XACK key group id [id ...] | StreamAcknowledge() | xack() | xack() | xAck() |
| Stream | XCLAIM key group consumer min-idle-time id... | StreamClaim() | xclaim() | xclaim() | xClaim() |
| Stream | XDEL key id [id ...] | StreamDelete() | xdel() | xdel() | xDel() |
| Stream | XGROUP subcommand ... | consumer-group APIs | xgroup...() | xgroup_*() | xGroup...() |
| Stream | XINFO STREAM|GROUPS|CONSUMERS ... | info APIs | xinfo...() | xinfo_*() | xInfo...() |
| Stream | XPENDING key group [range options] | pending APIs | xpending() | xpending() / xpending_range() | xPending() |
| Stream | XREADGROUP GROUP group consumer ... | StreamReadGroup() | xreadGroup() | xreadgroup() | xReadGroup() |
| Stream | XTRIM key MAXLEN|MINID ... | StreamTrim() | xtrim() | xtrim() | xTrim() |
| Stream | XSETID key last-id [options] | raw | raw | raw | raw |
Real-time publish/subscribe messaging. Publishers send messages to channels, and subscribers receive messages from channels or channel patterns. Unlike Streams, Pub/Sub does not normally retain messages for consumers that are offline.
| Type | RESP Command | StackExchange.Redis (.NET) | Jedis (Java) | redis-py (Python) | node-redis (Node.js) | NCache OSS |
|---|---|---|---|---|---|---|
| Pub/Sub | PSUBSCRIBE pattern [pattern ...] | pattern Subscribe() | psubscribe() | pubsub.psubscribe() | pSubscribe() | |
| Pub/Sub | PUBLISH channel message | Publish() | publish() | publish() | publish() | |
| Pub/Sub | PUNSUBSCRIBE [pattern ...] | pattern Unsubscribe() | punsubscribe() | pubsub.punsubscribe() | pUnsubscribe() | |
| Pub/Sub | SUBSCRIBE channel [channel ...] | Subscribe() | subscribe() | pubsub.subscribe() | subscribe() | |
| Pub/Sub | UNSUBSCRIBE [channel ...] | Unsubscribe() | unsubscribe() | pubsub.unsubscribe() | unsubscribe() | |
| Pub/Sub | PUBSUB subcommand [argument ...] | server/raw API | pubsub/raw | pubsub/raw | raw | |
| Pub/Sub | SPUBLISH shardchannel message | sharded API / raw | spublish() | spublish() | sPublish() | |
| Pub/Sub | SSUBSCRIBE shardchannel [...] | sharded API | ssubscribe() | ssubscribe() | sSubscribe() | |
| Pub/Sub | SUNSUBSCRIBE [shardchannel ...] | sharded API | sunsubscribe() | sunsubscribe() | sUnsubscribe() |
Commands used to establish and manage a client connection to Redis. Includes authentication, RESP protocol negotiation, health checks, selecting logical databases, setting client metadata, and resetting or closing connection state.
| Type | RESP Command | StackExchange.Redis (.NET) | Jedis (Java) | redis-py (Python) | node-redis (Node.js) | NCache OSS |
|---|---|---|---|---|---|---|
| Connection | AUTH [username] password | Connection configuration / automatic | auth() | auth() / connection config | connection config | |
| Connection | ECHO message | automatic connection validation | echo() | echo() | echo() | |
| Connection | HELLO [protover [AUTH ...] [SETNAME ...]] | automatic protocol handshake | hello() / raw | hello() | protocol negotiation | |
| Connection | PING [message] | Ping() / automatic keepalive | ping() | ping() | ping() | |
| Connection | SELECT index | database index / configuration | select() | select() | database option / raw | |
| Connection | RESET | raw | raw | raw | raw | |
| Connection | QUIT | connection disposal / raw | quit() | close() / raw QUIT | quit() / close() |
Administrative and server-management commands. Used for server information, configuration, persistence, replication, diagnostics, database flushing, memory inspection, failover, monitoring, and other operational functions.
| Type | RESP Command | StackExchange.Redis (.NET) | Jedis (Java) | redis-py (Python) | node-redis (Node.js) | NCache OSS |
|---|---|---|---|---|---|---|
| Server | INFO [section ...] | automatically used for topology/settings | info() | info() | info() | |
| Server | FLUSHALL [ASYNC|SYNC] | IServer.FlushAllDatabases() | flushAll() | flushall() | flushAll() | |
| Server | FLUSHDB [ASYNC|SYNC] | IServer.FlushDatabase() | flushDB() | flushdb() | flushDb() | |
| Server | TIME | IServer.Time() / raw | time() | time() | time() | |
| Server | LOLWUT [version] | raw | raw | raw | raw |
© Copyright Alachisoft 2002 - . All rights reserved. NCache is a registered trademark of Diyatech Corp.