Redis bitcount command returns a syntax error

130 Views Asked by At

after set myKey as key in Redis with foobar value I want to get the BITCOUNT of myKey. this command in Redis-CLI giving me an error: BITCOUNT myKey 2 3 BYTE

(error) ERR syntax error

how can I solve this?

1

There are 1 best solutions below

2
On BEST ANSWER

BYTE argument is fairly new and (will be) added in Redis 7.0. So far, only 7.0.0rc3 is released but no GA.

I assume you are using a pre Redis 7 version?