Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Getting Started with Redis

Getting Started with Redis

Redis(http://redis.io/)는 최근 눈부시게 성장하고 있는 Key-Value Store 형태의 NoSQL이다.
Redis **시작하기**인 만큼 많이 사용되는 명령어들을 위주로 살펴보았다.

Daniel Ku

April 28, 2014
Tweet

More Decks by Daniel Ku

Other Decks in Programming

Transcript

  1. INSTALLATION ON MAC $ b r e w i n

    s t a l l r e d i s Thanks, . brew
  2. START SERVER $ r e d i s - s

    e r v e r / u s r / l o c a l / e t c / r e d i s . c o n f
  3. START SERVER AT LOGIN ON MAC $ l n -

    s f v / u s r / l o c a l / o p t / r e d i s / * . p l i s t ~ / L i b r a r y / L a u n c h A g e n t s $ l a u n c h c t l l o a d ~ / L i b r a r y / L a u n c h A g e n t s / h o m e b r e w . m x c l . r e d i s . p l i s t
  4. START SHELL CLIENT $ r e d i s -

    c l i 1 2 7 . 0 . 0 . 1 : 6 3 7 9 >
  5. CONNECTION COMMANDS P I N G E C H O

    m e s s a g e Q U I T 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > p i n g P O N G 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > e c h o h e l l o " h e l l o " 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > q u i t
  6. DATABASE COMMANDS S E L E C T i n

    d e x 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > s e l e c t 1 O K 1 2 7 . 0 . 0 . 1 : 6 3 7 9 [ 1 ] > s e l e c t 1 5 O K 1 2 7 . 0 . 0 . 1 : 6 3 7 9 [ 1 5 ] > s e l e c t 1 6 / / e r r o r ( e r r o r ) E R R i n v a l i d D B i n d e x 1 2 7 . 0 . 0 . 1 : 6 3 7 9 [ 1 6 ] > s e l e c t 0 O K
  7. S E T k e y v a l u

    e G E T k e y 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > s e t n a m e " D a n i e l " O K 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > g e t n a m e " D a n i e l "
  8. A P P E N D k e y v

    a l u e S T R L E N k e y 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > g e t n a m e " D a n i e l " 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > a p p e n d n a m e " K u " ( i n t e g e r ) 9 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > g e t n a m e " D a n i e l K u " 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > s t r l e n n a m e ( i n t e g e r ) 9
  9. G E T R A N G E k e

    y s t a r t e n d S E T R A N G E k e y o f f s e t v a l u e 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > g e t n a m e " D a n i e l K u " 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > g e t r a n g e n a m e 4 7 " e l K " 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > s e t r a n g e n a m e 7 K i m ( i n t e g e r ) 1 0 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > g e t n a m e " D a n i e l K i m "
  10. G E T S E T k e y v

    a l u e 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > g e t n a m e " D a n i e l K i m " 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > g e t s e t n a m e " J e n n y L e e " " D a n i e l K i m " 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > g e t n a m e " J e n n y L e e "
  11. M S E T k e y v a l

    u e [ k e y v a l u e . . . ] M G E T k e y [ k e y . . . ] 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > m s e t n a m e 1 " D a n i e l K u " n a m e 2 " J e n n y L e e " O K 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > m g e t n a m e 1 n a m e 2 1 ) " D a n i e l K u " 2 ) " J e n n y L e e " M- = Multiple
  12. I N C R k e y D E C

    R k e y 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > s e t a g e 3 0 O K 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > g e t a g e " 3 0 " 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > i n c r a g e ( i n t e g e r ) 3 1 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > g e t a g e " 3 1 " 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > d e c r a g e ( i n t e g e r ) 3 0 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > g e t a g e " 3 0 "
  13. I N C R B Y k e y i

    n c r e m e n t D E C R B Y k e y d e c r e m e n t 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > g e t a g e " 3 0 " 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > i n c r b y a g e 1 0 ( i n t e g e r ) 4 0 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > i n c r b y a g e 1 0 ( i n t e g e r ) 5 0 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > d e c r b y a g e 1 0 ( i n t e g e r ) 4 0 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > g e t a g e " 4 0 "
  14. I N C R B Y F L O A

    T k e y i n c r e m e n t 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > g e t a g e " 4 0 " 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > i n c r b y a g e 1 . 5 ( e r r o r ) E R R v a l u e i s n o t a n i n t e g e r o r o u t o f r a n g e 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > i n c r b y f l o a t a g e 1 . 5 " 4 1 . 5 " 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > g e t a g e " 4 1 . 5 " 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > i n c r a g e ( e r r o r ) E R R v a l u e i s n o t a n i n t e g e r o r o u t o f r a n g e
  15. S E T E X k e y s e

    c o n d s v a l u e P S E T E X k e y m i l l i s v a l u e 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > g e t n a m e " J e n n y L e e " 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > s e t e x n a m e 5 " D a n i e l K u " O K 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > g e t n a m e " D a n i e l K u " 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > g e t n a m e / / a f t e r 5 s e c o n d s ( n i l ) 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > p s e t e x n a m e 5 0 0 0 " D a n i e l K u " O K 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > g e t n a m e " D a n i e l K u " 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > g e t n a m e / / a f t e r 5 0 0 0 m i l l i s e c o n d s ( n i l ) -EX = EXpire
  16. S E T N X k e y v a

    l u e 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > g e t n a m e ( n i l ) 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > s e t n x n a m e " D a n i e l K u " ( i n t e g e r ) 1 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > g e t n a m e " D a n i e l K u " 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > s e t n x n a m e " J e n n y L e e " ( i n t e g e r ) 0 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > g e t n a m e " D a n i e l K u " -NX = Not eXist
  17. M S E T N X k e y v

    a l u e [ k e y v a l u e . . . ] 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > m s e t n x x 1 y 2 ( i n t e g e r ) 1 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > m g e t x y 1 ) " 1 " 2 ) " 2 " 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > m s e t n x x 3 z 4 ( i n t e g e r ) 0 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > m g e t x y z 1 ) " 1 " 2 ) " 2 " 3 ) ( n i l )
  18. L P U S H k e y v a

    l u e [ v a l u e . . . ] L R A N G E k e y s t a r t s t o p 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > l p u s h l i s t a b c ( i n t e g e r ) 3 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > l r a n g e l i s t 0 - 1 1 ) " c " 2 ) " b " 3 ) " a " 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > l p u s h l i s t d ( i n t e g e r ) 4 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > l r a n g e l i s t 0 - 1 1 ) " d " 2 ) " c " 3 ) " b " 4 ) " a " 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > l r a n g e l i s t 2 3 1 ) " b " 2 ) " a " L- = List & Left
  19. R P U S H k e y v a

    l u e [ v a l u e . . . ] 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > l r a n g e l i s t 0 - 1 1 ) " d " 2 ) " c " 3 ) " b " 4 ) " a " 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > r p u s h l i s t z ( i n t e g e r ) 5 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > l r a n g e l i s t 0 - 1 1 ) " d " 2 ) " c " 3 ) " b " 4 ) " a " 5 ) " z " R- = Right
  20. L P O P k e y R P O

    P k e y L L E N k e y 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > l p o p l i s t " d " 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > l r a n g e l i s t 0 - 1 1 ) " c " 2 ) " b " 3 ) " a " 4 ) " z " 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > r p o p l i s t " z " 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > l r a n g e l i s t 0 - 1 1 ) " c " 2 ) " b " 3 ) " a " 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > l l e n l i s t ( i n t e g e r ) 3
  21. L R E M k e y c o u

    n t v a l u e 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > l r a n g e l i s t 0 - 1 1 ) " c " 2 ) " b " 3 ) " a " 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > l r e m l i s t 1 a ( i n t e g e r ) 1 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > l r a n g e l i s t 0 - 1 1 ) " c " 2 ) " b " 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > l r e m l i s t 1 a ( i n t e g e r ) 0 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > l r a n g e l i s t 0 - 1 1 ) " c " 2 ) " b "
  22. 1 2 7 . 0 . 0 . 1 :

    6 3 7 9 > l p u s h l i s t c b a b ( i n t e g e r ) 6 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > l r a n g e l i s t 0 - 1 1 ) " b " 2 ) " a " 3 ) " b " 4 ) " c " 5 ) " c " 6 ) " b " 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > l r e m l i s t 2 b ( i n t e g e r ) 2 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > l r a n g e l i s t 0 - 1 1 ) " a " 2 ) " c " 3 ) " c " 4 ) " b "
  23. 1 2 7 . 0 . 0 . 1 :

    6 3 7 9 > l p u s h l i s t c ( i n t e g e r ) 5 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > l r a n g e l i s t 0 - 1 1 ) " c " 2 ) " a " 3 ) " c " 4 ) " c " 5 ) " b " 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > l r e m l i s t - 2 c ( i n t e g e r ) 2 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > l r a n g e l i s t 0 - 1 1 ) " c " 2 ) " a " 3 ) " b "
  24. L I N S E R T k e y

    B E F O R E | A F T E R p i v o t v a l u e 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > l r a n g e l i s t 0 - 1 1 ) " c " 2 ) " a " 3 ) " b " 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > l i n s e r t l i s t b e f o r e a x ( i n t e g e r ) 4 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > l r a n g e l i s t 0 - 1 1 ) " c " 2 ) " x " 3 ) " a " 4 ) " b "
  25. 1 2 7 . 0 . 0 . 1 :

    6 3 7 9 > l i n s e r t l i s t a f t e r a y ( i n t e g e r ) 5 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > l r a n g e l i s t 0 - 1 1 ) " c " 2 ) " x " 3 ) " a " 4 ) " y " 5 ) " b "
  26. L I N D E X k e y i

    n d e x 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > l r a n g e l i s t 0 - 1 1 ) " c " 2 ) " x " 3 ) " a " 4 ) " y " 5 ) " b " 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > l i n d e x l i s t 0 " c " 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > l i n d e x l i s t - 1 " b " 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > l i n d e x l i s t 3 " y "
  27. L S E T k e y i n d

    e x v a l u e 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > l r a n g e l i s t 0 - 1 1 ) " c " 2 ) " x " 3 ) " a " 4 ) " y " 5 ) " b " 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > l s e t l i s t 1 X O K 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > l r a n g e l i s t 0 - 1 1 ) " c " 2 ) " X " 3 ) " a " 4 ) " y " 5 ) " b "
  28. L T R I M k e y s t

    a r t s t o p 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > l r a n g e l i s t 0 - 1 1 ) " c " 2 ) " X " 3 ) " a " 4 ) " y " 5 ) " b " 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > l t r i m l i s t 2 3 O K 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > l r a n g e l i s t 0 - 1 1 ) " a " 2 ) " y "
  29. R P O P L P U S H s

    o u r c e d e s t i n a t i o n 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > l r a n g e l i s t 0 - 1 1 ) " a " 2 ) " y " 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > r p o p l p u s h l i s t l i s t 2 " y " 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > l r a n g e l i s t 0 - 1 1 ) " a " 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > l r a n g e l i s t 2 0 - 1 1 ) " y " 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > r p o p l p u s h l i s t l i s t 2 " a " 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > l r a n g e l i s t 0 - 1 ( e m p t y l i s t o r s e t ) 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > l r a n g e l i s t 2 0 - 1 1 ) " a " 2 ) " y "
  30. L P U S H X k e y v

    a l u e R P U S H X k e y v a l u e 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > l r a n g e l i s t 0 - 1 ( e m p t y l i s t o r s e t ) 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > l r a n g e l i s t 2 0 - 1 1 ) " a " 2 ) " y " 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > l p u s h x l i s t a ( i n t e g e r ) 0 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > l r a n g e l i s t 0 - 1 ( e m p t y l i s t o r s e t ) 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > l p u s h x l i s t 2 b ( i n t e g e r ) 3 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > l r a n g e l i s t 2 0 - 1 1 ) " b " 2 ) " a " 3 ) " y " -X = eXist
  31. B L P O P k e y [ k

    e y . . . ] t i m e o u t B R P O P k e y [ k e y . . . ] t i m e o u t Client #1 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > l r a n g e n a m e s 0 - 1 ( e m p t y l i s t o r s e t ) 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > l p u s h n a m e s d a n i e l ( i n t e g e r ) 1 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > l r a n g e n a m e s 0 - 1 1 ) " d a n i e l " Client #2 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > b l p o p n a m e s 1 1 ) " n a m e s " 2 ) " d a n i e l " Client #1 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > l r a n g e n a m e s 0 - 1 ( e m p t y l i s t o r s e t ) B- = Blocking
  32. Client #1 1 2 7 . 0 . 0 .

    1 : 6 3 7 9 > b l p o p n a m e s 5 / / w a i t f o r 5 s e c o n d s ( n i l ) ( 5 . 2 4 s ) 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > b l p o p n a m e s 5 Client #2 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > l p u s h n a m e s d a n i e l ( i n t e g e r ) 1 Client #1 1 ) " n a m e s " 2 ) " d a n i e l " ( 2 . 4 7 s )
  33. Client #1 1 2 7 . 0 . 0 .

    1 : 6 3 7 9 > b l p o p n a m e s n a m e s 2 5 Client #2 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > l p u s h n a m e s 2 d a n i e l ( i n t e g e r ) 1 Client #1 1 ) " n a m e s 2 " 2 ) " d a n i e l " ( 3 . 1 8 s )
  34. B R P O P L P U S H

    s o u r c e d e s t i n a t i o n t i m e o u t Client #1 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > l r a n g e n a m e s 0 - 1 ( e m p t y l i s t o r s e t ) 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > l r a n g e n a m e s 2 0 - 1 ( e m p t y l i s t o r s e t ) 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > b r p o p l p u s h n a m e s n a m e s 2 5 Client #2 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > l p u s h n a m e s d a n i e l ( i n t e g e r ) 1 Client #1 " d a n i e l " ( 2 . 0 3 s ) 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > l r a n g e n a m e s 0 - 1 ( e m p t y l i s t o r s e t ) 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > l r a n g e n a m e s 2 0 - 1 1 ) " d a n i e l "
  35. H S E T k e y f i e

    l d v a l u e H G E T k e y f i e l d H G E T A L L k e y 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > h s e t o b j e c t n a m e d a n i e l ( i n t e g e r ) 1 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > h s e t o b j e c t a g e 3 4 ( i n t e g e r ) 1 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > h g e t o b j e c t n a m e " d a n i e l " 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > h g e t o b j e c t a g e " 3 4 " 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > h g e t a l l o b j e c t 1 ) " n a m e " 2 ) " d a n i e l " 3 ) " a g e " 4 ) " 3 4 " H- = Hash
  36. H K E Y S k e y H V

    A L S k e y H E X I S T S k e y f i e l d H L E N k e y 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > h k e y s o b j e c t 1 ) " n a m e " 2 ) " a g e " 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > h v a l s o b j e c t 1 ) " d a n i e l " 2 ) " 3 4 " 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > h e x i s t s o b j e c t n a m e ( i n t e g e r ) 1 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > h e x i s t s o b j e c t j o b ( i n t e g e r ) 0 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > h l e n o b j e c t ( i n t e g e r ) 2
  37. H I N C R B Y k e y

    f i e l d i n c r e m e n t H I N C R B Y F L O A T k e y f i e l d i n c r e m e n t 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > h i n c r b y o b j e c t a g e 1 ( i n t e g e r ) 3 5 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > h i n c r b y o b j e c t a g e - 2 ( i n t e g e r ) 3 3 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > h g e t a l l o b j e c t 1 ) " n a m e " 2 ) " d a n i e l " 3 ) " a g e " 4 ) " 3 3 "
  38. H M S E T k e y f i

    e l d v a l u e [ f i e l d v a l u e . . . ] H M G E T k e y f i e l d [ f i e l d . . . ] 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > h m s e t o b j e c t 2 f 1 x f 2 y O K 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > h m g e t o b j e c t 2 f 1 f 2 1 ) " x " 2 ) " y " 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > h g e t a l l o b j e c t 2 1 ) " f 1 " 2 ) " x " 3 ) " f 2 " 4 ) " y "
  39. H S E T N X k e y f

    i e l d v a l u e 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > h s e t n x o b j e c t 2 f 3 z ( i n t e g e r ) 1 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > h s e t n x o b j e c t 2 f 3 Z ( i n t e g e r ) 0 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > h g e t a l l o b j e c t 2 1 ) " f 1 " 2 ) " x " 3 ) " f 2 " 4 ) " y " 5 ) " f 3 " 6 ) " z "
  40. H D E L k e y f i e

    l d [ f i e l d . . . ] 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > h d e l o b j e c t 2 f 3 ( i n t e g e r ) 1 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > h d e l o b j e c t 2 f 2 ( i n t e g e r ) 1 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > h g e t a l l o b j e c t 2 1 ) " f 1 " 2 ) " x "
  41. S A D D k e y m e m

    b e r [ m e m b e r . . . ] S M E M B E R S k e y 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > s a d d s e t o n e ( i n t e g e r ) 1 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > s a d d s e t t w o t h r e e ( i n t e g e r ) 2 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > s m e m b e r s s e t 1 ) " o n e " 2 ) " t h r e e " 3 ) " t w o " S- = Set
  42. S R E M k e y m e m

    b e r [ m e m b e r . . . ] S I S M E M B E R k e y m e m b e r S C A R D k e y 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > s r e m s e t t h r e e ( i n t e g e r ) 1 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > s m e m b e r s s e t 1 ) " o n e " 2 ) " t w o " 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > s i s m e m b e r s e t o n e ( i n t e g e r ) 1 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > s i s m e m b e r s e t t h r e e ( i n t e g e r ) 0 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > s c a r d s e t ( i n t e g e r ) 2
  43. S R A N D M E M B E

    R k e y 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > s a d d s e t t h r e e ( i n t e g e r ) 1 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > s m e m b e r s s e t 1 ) " o n e " 2 ) " t h r e e " 3 ) " t w o " 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > s r a n d m e m b e r s e t " t w o " 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > s r a n d m e m b e r s e t " o n e " 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > s r a n d m e m b e r s e t " t w o " 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > s r a n d m e m b e r s e t " t w o " 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > s r a n d m e m b e r s e t " t h r e e "
  44. S P O P k e y 1 2 7

    . 0 . 0 . 1 : 6 3 7 9 > s p o p s e t " o n e " 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > s p o p s e t " t h r e e " 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > s m e m b e r s s e t 1 ) " t w o " 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > s p o p s e t " t w o " 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > s m e m b e r s s e t ( e m p t y l i s t o r s e t )
  45. S D I F F k e y [ k

    e y . . . ] S D I F F S T O R E d e s t i n a t i o n k e y [ k e y . . . ] 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > s a d d s e t 1 o n e t w o t h r e e ( i n t e g e r ) 3 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > s a d d s e t 2 o n e t w o f o u r f i v e ( i n t e g e r ) 4 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > s d i f f s e t 1 s e t 2 1 ) " t h r e e " 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > s d i f f s e t 2 s e t 1 1 ) " f o u r " 2 ) " f i v e " 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > s d i f f s t o r e s e t 3 s e t 1 s e t 2 ( i n t e g e r ) 1 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > s m e m b e r s s e t 3 1 ) " t h r e e "
  46. S I N T E R k e y [

    k e y . . . ] S I N T E R S T O R E d e s t i n a t i o n k e y [ k e y . . . ] S U N I O N k e y [ k e y . . . ] S U N I O N S T O R E d e s t i n a t i o n k e y [ k e y . . . ] 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > s i n t e r s e t 1 s e t 2 1 ) " o n e " 2 ) " t w o " 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > s u n i o n s e t 1 s e t 2 1 ) " t w o " 2 ) " o n e " 3 ) " f o u r " 4 ) " f i v e " 5 ) " t h r e e "
  47. S M O V E s o u r c

    e d e s t i n a t i o n m e m b e r 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > s m o v e s e t 1 s e t 2 t h r e e ( i n t e g e r ) 1 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > s m e m b e r s s e t 1 1 ) " o n e " 2 ) " t w o " 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > s m e m b e r s s e t 2 1 ) " f o u r " 2 ) " o n e " 3 ) " f i v e " 4 ) " t w o " 5 ) " t h r e e "
  48. Z A D D k e y s c o

    r e m e m b e r [ s c o r e m e m b e r . . . ] Z C A R D k e y 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > z a d d z s e t 1 0 o n e ( i n t e g e r ) 1 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > z a d d z s e t 2 0 t w o 3 0 t h r e e ( i n t e g e r ) 2 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > z c a r d z s e t ( i n t e g e r ) 3 Z- = Sorted Set
  49. Z S C O R E k e y m

    e m b e r Z C O U N T k e y m i n m a x 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > z s c o r e z s e t o n e " 1 0 " 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > z s c o r e z s e t t w o " 2 0 " 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > z c o u n t z s e t - i n f + i n f ( i n t e g e r ) 3 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > z c o u n t z s e t 1 0 2 0 ( i n t e g e r ) 2 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > z c o u n t z s e t 1 0 ( 2 0 ( i n t e g e r ) 1 Z- = Sorted Set
  50. Z R A N K k e y m e

    m b e r Z R E V R A N K k e y m e m b e r 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > z r a n k z s e t o n e ( i n t e g e r ) 0 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > z r a n k z s e t t h r e e ( i n t e g e r ) 2 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > z r e v r a n k z s e t o n e ( i n t e g e r ) 2 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > z r e v r a n k z s e t t h r e e ( i n t e g e r ) 0
  51. Z R A N G E k e y s

    t a r t s t o p [ W I T H S C O R E S ] Z R E V R A N G E k e y s t a r t s t o p [ W I T H S C O R E S ] 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > z r a n g e z s e t 0 - 1 1 ) " o n e " 2 ) " t w o " 3 ) " t h r e e " 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > z r a n g e z s e t 0 - 1 w i t h s c o r e s 1 ) " o n e " 2 ) " 1 0 " 3 ) " t w o " 4 ) " 2 0 " 5 ) " t h r e e " 6 ) " 3 0 " 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > z r e v r a n g e z s e t 0 1 w i t h s c o r e s 1 ) " t h r e e " 2 ) " 3 0 " 3 ) " t w o " 4 ) " 2 0 "
  52. Z R A N G E B Y S C

    O R E k e y m i n m a x [ W I T H S C O R E S ] [ L I M I T o f f s e t c o u n t ] Z R E V R A N G E B Y S C O R E k e y m i n m a x [ W I T H S C O R E S ] [ L I M I T o f f s e t c o u n t ] 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > z r a n g e b y s c o r e z s e t 2 0 3 0 1 ) " t w o " 2 ) " t h r e e " 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > z r a n g e b y s c o r e z s e t ( 2 0 3 0 w i t h s c o r e s 1 ) " t h r e e " 2 ) " 3 0 " 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > z r e v r a n g e b y s c o r e z s e t 3 0 ( 1 0 w i t h s c o r e s 1 ) " t h r e e " 2 ) " 3 0 " 3 ) " t w o " 4 ) " 2 0 " 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > z r e v r a n g e b y s c o r e z s e t + i n f - i n f w i t h s c o r e s l i m i t 2 1 1 ) " o n e " 2 ) " 1 0 "
  53. Z I N C R B Y k e y

    i n c r e m e n t m e m b e r Z R E M k e y m e m b e r [ m e m b e r . . . ] 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > z i n c r b y z s e t 5 t w o " 2 5 " 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > z s c o r e z s e t t w o " 2 5 " 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > z r e m z s e t t h r e e ( i n t e g e r ) 1 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > z r a n g e z s e t 0 - 1 w i t h s c o r e s 1 ) " o n e " 2 ) " 1 0 " 3 ) " t w o " 4 ) " 2 5 "
  54. Z R E M R A N G E B

    Y S C O R E k e y m i n m a x Z R E M R A N G E B Y R A N K k e y m i n m a x 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > z r e m r a n g e b y s c o r e z s e t 1 0 2 0 ( i n t e g e r ) 1 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > z r a n g e z s e t 0 - 1 w i t h s c o r e s 1 ) " t w o " 2 ) " 2 5 " 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > z r e m r a n g e b y r a n k z s e t 0 - 1 ( i n t e g e r ) 1 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > z r a n g e z s e t 0 - 1 w i t h s c o r e s ( e m p t y l i s t o r s e t )
  55. K E Y S p a t t e n

    1 2 7 . 0 . 0 . 1 : 6 3 7 9 > k e y s * 1 ) " s e t 2 " 2 ) " s e t 3 " 3 ) " o b j e c t 2 " 4 ) " n a m e 1 " 5 ) " x " 6 ) " o b j e c t " 7 ) " a g e " 8 ) " l i s t 2 " 9 ) " n a m e 2 " 1 0 ) " n a m e " 1 1 ) " y " 1 2 ) " s e t 1 " 1 3 ) " n a m e s 2 " 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > k e y s n a m e * 1 ) " n a m e 1 " 2 ) " n a m e 2 " 3 ) " n a m e " 4 ) " n a m e s 2 " 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > k e y s s e t * 1 ) " s e t 2 " 2 ) " s e t 3 " 3 ) " s e t 1 "
  56. E X I S T S k e y T

    Y P E k e y 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > e x i s t s n a m e ( i n t e g e r ) 1 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > e x i s t s s e t ( i n t e g e r ) 0 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > t y p e n a m e s t r i n g 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > t y p e a g e s t r i n g 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > t y p e s e t 1 s e t 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > t y p e l i s t 2 l i s t
  57. D E L k e y [ k e y

    . . . ] 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > d e l x y ( i n t e g e r ) 2 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > k e y s * 1 ) " s e t 2 " 2 ) " s e t 3 " 3 ) " o b j e c t 2 " 4 ) " l i s t " 5 ) " n a m e 1 " 6 ) " o b j e c t " 7 ) " a g e " 8 ) " n a m e 2 " 9 ) " n a m e " 1 0 ) " s e t 1 " 1 1 ) " n a m e s 2 "
  58. R E N A M E k e y n

    e w k e y R E N A M E N X k e y n e w k e y 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > k e y s l i s t * 1 ) " l i s t 2 " 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > r e n a m e l i s t 2 l i s t O K 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > k e y s l i s t * 1 ) " l i s t " 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > k e y s n a m e * 1 ) " n a m e 1 " 2 ) " n a m e s 2 " 3 ) " n a m e 2 " 4 ) " n a m e " 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > r e n a m e n x n a m e 2 n a m e ( i n t e g e r ) 0 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > r e n a m e n x n a m e s 2 n a m e s ( i n t e g e r ) 1 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > k e y s n a m e * 1 ) " n a m e 1 " 2 ) " n a m e s " 3 ) " n a m e 2 " 4 ) " n a m e "
  59. M O V E k e y d b 1

    2 7 . 0 . 0 . 1 : 6 3 7 9 > k e y s n a m e * 1 ) " n a m e 1 " 2 ) " n a m e s " 3 ) " n a m e 2 " 4 ) " n a m e " 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > m o v e n a m e 1 ( i n t e g e r ) 1 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > k e y s n a m e * 1 ) " n a m e 1 " 2 ) " n a m e s " 3 ) " n a m e 2 " 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > s e l e c t 1 O K 1 2 7 . 0 . 0 . 1 : 6 3 7 9 [ 1 ] > k e y s n a m e * 1 ) " n a m e " 1 2 7 . 0 . 0 . 1 : 6 3 7 9 [ 1 ] > s e l e c t 0 O K
  60. R A N D O M K E Y 1

    2 7 . 0 . 0 . 1 : 6 3 7 9 > r a n d o m k e y " s e t 2 " 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > r a n d o m k e y " n a m e 1 " 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > r a n d o m k e y " l i s t " 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > r a n d o m k e y " n a m e 2 " 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > r a n d o m k e y " a g e " 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > r a n d o m k e y " o b j e c t 2 " 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > r a n d o m k e y " s e t 1 "
  61. E X P I R E k e y s

    e c o n d s P E X P I R E k e y m i l l i s E X P I R E A T k e y t i m e s t a m p P E X P I R E A T k e y m i l l i s - t i m e s t a m p 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > e x p i r e n a m e 1 5 ( i n t e g e r ) 1 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > g e t n a m e 1 " D a n i e l K u " 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > g e t n a m e 1 / / a f t e r 5 s e c o n d s ( n i l ) 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > p e x p i r e n a m e 2 5 0 0 0 ( i n t e g e r ) 1 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > g e t n a m e 2 " J e n n y L e e " 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > g e t n a m e 2 / / a f t e r 5 0 0 0 s e c o n d s ( n i l )
  62. T T L k e y P T T L

    k e y 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > s e t a g e 3 4 O K 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > t t l a g e ( i n t e g e r ) - 1 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > e x p i r e a g e 5 ( i n t e g e r ) 1 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > t t l a g e ( i n t e g e r ) 4 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > p t t l a g e ( i n t e g e r ) 1 7 2 0 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > t t l a g e ( i n t e g e r ) - 2
  63. P E R S I S T k e y

    1 2 7 . 0 . 0 . 1 : 6 3 7 9 > s e t n a m e D a n i e l O K 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > e x p i r e n a m e 5 ( i n t e g e r ) 1 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > t t l n a m e ( i n t e g e r ) 3 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > p e r s i s t n a m e ( i n t e g e r ) 1 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > t t l n a m e ( i n t e g e r ) - 1 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > g e t n a m e " D a n i e l "
  64. P U B L I S H c h a

    n n e l m e s s a g e S U B S C R I B E c h a n n e l [ c h a n n e l . . . ] Client #1 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > s u b s c r i b e c h a n n e l 1 R e a d i n g m e s s a g e s . . . ( p r e s s C t r l - C t o q u i t ) 1 ) " s u b s c r i b e " 2 ) " c h a n n e l 1 " 3 ) ( i n t e g e r ) 1 Client #2 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > p u b l i s h c h a n n e l 1 " H e l l o " ( i n t e g e r ) 1 Client #1 1 ) " m e s s a g e " 2 ) " c h a n n e l 1 " 3 ) " H e l l o "
  65. P S U B S C R I B E

    p a t t e r n [ p a t t e r n . . . ] Client #1 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > p s u b s c r i b e c h a n n e l * R e a d i n g m e s s a g e s . . . ( p r e s s C t r l - C t o q u i t ) 1 ) " p s u b s c r i b e " 2 ) " c h a n n e l * " 3 ) ( i n t e g e r ) 1 Client #2 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > p u b l i s h c h a n n e l 1 H i ( i n t e g e r ) 2 Client #1 1 ) " p m e s s a g e " 2 ) " c h a n n e l * " 3 ) " c h a n n e l 1 " 4 ) " H i "
  66. Client #2 1 2 7 . 0 . 0 .

    1 : 6 3 7 9 > p u b l i s h c h a n n e l 2 H e l l o ( i n t e g e r ) 2 Client #1 1 ) " p m e s s a g e " 2 ) " c h a n n e l * " 3 ) " c h a n n e l 2 " 4 ) " H e l l o "
  67. U N S U B S C R I B

    E [ c h a n n e l [ c h a n n e l . . . ] ] P U N S U B S C R I B E [ p a t t e r n [ p a t t e r n . . . ] ] Not Applicable in redis-cli
  68. M U L T I E X E C 1

    2 7 . 0 . 0 . 1 : 6 3 7 9 > m u l t i O K 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > s e t n a m e " D a n i e l " Q U E U E D 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > s e t a g e 2 0 Q U E U E D 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > e x e c 1 ) O K 2 ) O K 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > m g e t n a m e a g e 1 ) " D a n i e l " 2 ) " 2 0 "
  69. 1 2 7 . 0 . 0 . 1 :

    6 3 7 9 > m u l t i O K 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > i n c r n a m e Q U E U E D 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > i n c r a g e Q U E U E D 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > e x e c 1 ) ( e r r o r ) E R R v a l u e i s n o t a n i n t e g e r o r o u t o f r a n g e 2 ) ( i n t e g e r ) 2 1 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > m g e t n a m e a g e 1 ) " D a n i e l " 2 ) " 2 1 "
  70. D I S C A R D 1 2 7

    . 0 . 0 . 1 : 6 3 7 9 > m u l t i O K 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > s e t n a m e " D a n i e l " Q U E U E D 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > s e t a g e 3 0 Q U E U E D 1 2 7 . 0 . 0 . 1 : 6 3 7 9 > d i s c a r d O K
  71. SOCKET.IO http://socket.io/ $ n p m i n s t

    a l l s o c k e t . i o $ b o w e r i n s t a l l s o c k e t . i o - c l i e n t