Redis

From Easy Develop
Jump to: navigation, search

Contents

[edit] Keys pattern

  • h?llo matches hello, hallo and hxllo
  • h*llo matches hllo and heeeello
  • h[ae]llo matches hello and hallo, but not hillo

Use \ to escape special characters if you want to match them verbatim.

[edit] Examples

redis 127.0.0.1:6379> mset one a two b three c four d
OK
redis 127.0.0.1:6379> keys *
1) "four"
2) "three"
3) "two"
4) "one"
redis 127.0.0.1:6379> keys *o*
1) "four"
2) "two"
3) "one"
redis 127.0.0.1:6379> keys t*
1) "three"
2) "two"
redis 127.0.0.1:6379> keys *e
1) "three"
2) "one"

http://redis.io/commands/keys <comments/>

[edit] Commands:

[edit] Sorted set

[edit] Set

[edit] hash


http://redis.io/commands#set


netstat -np | grep redis | wc -l

[edit] Option to set custom Redis database number

select <DB_NUMBER>

[edit] FAQs:

[edit] How to iterate over redis pubsub_channels?

<comments/>

[edit] How to find out redis server version?

$ redis-cli
redis 127.0.0.1:6379> info
redis_version:2.2.12

<comments/>



Personal tools
Namespaces

Variants
Actions
Language
RDBMS
Text editor
MY PROJECTS
other
Toolbox