1

I registered my RedisClient in my ServiceStack app host as follows

container.Register<IRedisClientsManager>(c => new RedisManagerPool(conn));
container.Register(c => c.Resolve<IRedisClientsManager>().GetCacheClient().WithPrefix("MyPrefix"));

however, in my Service when I call

var keys = Cache.GetAllKeys();

i received this error: ServiceStack.Redis.RedisResponseException: unknown command 'SCAN'

how should I solve this? I would like to clear all keys in this CacheClient with the prefix setup in the container.

icube
  • 2,578
  • 1
  • 30
  • 63
  • What version of redis are you using? SCAN is a relatively new command. – Not_a_Golfer Aug 03 '17 at 10:05
  • i'm using 2.4.6. I downloaded from https://github.com/rgl/redis/downloads as i'm using windows – icube Aug 03 '17 at 10:23
  • ok, so 2.4.6 is an ancient version, like 5-6 years old. And redis on windows isn't officially supported, I suggest you run docker and use a redis image on that. – Not_a_Golfer Aug 03 '17 at 10:28

1 Answers1

0

You're using an extremely outdated version of Redis that doesn't implement the SCAN operations.

You can follow these instructions to install a recent version of Redis on Windows.

mythz
  • 141,670
  • 29
  • 246
  • 390