Redis “Namespace”

Norman Fung
Oct 15, 2021

--

Lets start with simplest commands SET/GET to show concept of name space in Redis. You see ‘ns1:key1’ separated by colon and can be hierarchical.

127.0.0.1:6379> set 'ns1:key1' 'val1'
OK
127.0.0.1:6379> set 'ns1:key2' 'val2'
OK
127.0.0.1:6379> get 'ns1:key1'
"val1"
127.0.0.1:6379> get 'ns1:key2'
"val2"
127.0.0.1:6379> set 'ns1:l1:key1' 'val1_ns1_l1'
OK
127.0.0.1:6379> set 'ns1:l1:key2' 'val2_ns1_l1'
OK

From Redis RDB (Free on Linux), “namespaces” are represented by folders.

Redis command reference: https://redis.io/commands

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Norman Fung
Norman Fung

Written by Norman Fung

I am an engineer, solo systematic trader, with itchy fingers. https://github.com/r0bbar/siglab/blob/master/siglab_py/README.md #python #crypto

No responses yet

Write a response