0

I'm using Azure RedisCache, and when I call the following command:

_cache.KeyDelete(key, CommandFlags.HighPriority)

The key is not deleted and there are no errors.

Similarly, nor does the following work if a key/value is already set:

_cache.StringSet(dataKey, "")
_cache.KeyExpire(dataKey, DateTime.UtcNow.AddDays(-2), CommandFlags.HighPriority)
Le-roy Staines
  • 2,037
  • 2
  • 22
  • 40
  • What's the SDK you're using? – Gaurav Mantri Jun 16 '21 at 11:31
  • Le-roy Staines - Is the answer provided was helpful for you ? if so could you please accept the answer (click on the check mark beside the answer to toggle it from greyed out to filled in) as solution for your ask. This could be beneficial to other community members. – Madhuraj Vadde Jun 25 '21 at 13:21

1 Answers1

0

Make Sure you enable allowAdmin=true in the config string or Configuarationoptions

You may checkout the SO thread addressing similar issue.

CHEEKATLAPRADEEP
  • 12,191
  • 1
  • 19
  • 42
SaiSakethGuduru
  • 2,218
  • 1
  • 5
  • 15