First, as Sergio Tulentsev mentioned, your GUI is interpreting colons as performing namespacing. Redis itself, does not do this. There's good discussion of the role of colons in Redis in this SO question.
That said, you will need to write code to do this. How that code is written depends on what environment you plan on doing this in and what your speed and consistency requirements are.
If you just want to do this locally or on dev to get a basic idea of what top level keys you have, you can just call KEYS *
through your backend language Redis client of choice and then iterate through what's returned to find all top level namespaces. An example in Python using redis-py:
import redis
r = redis.Redis(host='localhost', port=6379, db=0)
top_level_namespaces = set([item.split(':')[0] for item in r.keys('*')])
If you want to do this in production, you have to keep in mind that KEYS *
is very, very slow and will block the redis db til it finishes. If you're OK with that, you can write a quick LUA script with the same logic as my Python example above so that the logic is run on the Redis server and you don't need to waste network time transferring all keys back to your app server.
If KEYS(*)
is too slow for your use case, and consistency is not super important, you can use SCAN instead and iterate over the results.
If KEYS(*)
is too slow and consistency is very important, the best thing you can do is maintain an auxiliary set of your top level namespaces in your app as application logic and just SMEMBERS
to retrieve them when needed. Writing and maintaining the application logic will be annoying, but this will be the fastest and most durable approach.