0

I have created a bat file for deleting custom data from Redis DB. I have following code

@echo off & cls
title :Redis Service
echo "Redis cache clearing started"
for /F "tokens=*" %%f IN ('redis-cli -h 192.134.56.67 -p 6379 -a MyPassword keys "My.Key.*"') do (
 echo "%%~f"
 redis-cli -h 192.134.56.67 -p 6379 -a MyPassword del "%%~f"
)
echo deletion completed

But it takes a long time to execute. How to use SCAN instead of KEY command in above code

Abdul Manaf
  • 4,933
  • 8
  • 51
  • 95

0 Answers0