diff options
Diffstat (limited to 'doc/note/redis/redis.txt')
-rw-r--r-- | doc/note/redis/redis.txt | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/doc/note/redis/redis.txt b/doc/note/redis/redis.txt new file mode 100644 index 0000000..d64948a --- /dev/null +++ b/doc/note/redis/redis.txt @@ -0,0 +1,32 @@ + +Redis +================ + + +## Run redis commands from cli + +redis-cli -a ***** SCAN 0 + + +## Example commands + +SCAN 0 COUNT 42 +TYPE key +GET redisques:queues:vehicleoperation-events-for-vehicle-9942 +LRANGE key start stop +LRANGE key 1 1 (get head) +LRANGE key -1 -1 (get tail) + + +## List all keys (WARN: do NOT in production!) + +SCAN 0 MATCH *part:of:key:* COUNT 42 +KEYS *:part:inside-the:key:* +KEYS redisques:queues:vehicleoperation-events-for-vehicle-* + + +## Delete by pattern + +redis-cli --scan --pattern schedulers:* | xargs redis-cli del + + |