0

I'm able to set keys that contain an email address like mario@mario.com but I cannot set a hash that contains @ character. What are the characters allowed when setting a hash key?

enter image description here

Is is possible to set a hash key that contains an email?

Mario
  • 1,213
  • 2
  • 12
  • 37
  • 3
    First `DEL mario@mario.com` and then try to use `HSET` - the error tells you what you're doing wrong (i.e. trying to store a Hash in an existing String key) – Itamar Haber Aug 29 '19 at 15:52
  • 1
    This is embarrassing! I tried with a couple of different emails and also with some prefixes but didn't realize I had already all those keys. Thanks @ItamarHaber! – Mario Aug 29 '19 at 21:05
  • 1
    I run `FLUSHALL` whenever I'm in the cli... good dev practice, but really bad for production ;) – Itamar Haber Aug 30 '19 at 09:04
  • Yeah, great tip! Thanks @ItamarHaber :) – Mario Aug 30 '19 at 14:20

0 Answers0