I tried to set up the end task after deploying the Web App to clean the cache in Azure Redis to avoid making old caches effective. I tried both command az cli, and Powershell both of them did the same restart, but all data in the Redis cache still did not flush, even in activilogs showing data will be lost after restart. I have tested on both Tier C0 and P1 Redis. Has anyone given me a script to flush all Azure Redis? I am setting only SSL port 3380.
This is the command I run:
-CLI
az redis force-reboot --name $Redis --resource-group $ResourceGroup --reboot-type AllNodes
-Powershell:
Reset-AzRedisCache -ResourceGroupName $ResourceGroup -Name $Redis -RebootType "AllNodes" -Force
Check in redis tool manager still have data:

Thank you for helping me!
setup task Flushall Azure Redis

The command
force-rebootused for Reboot specified Redis node from this MSDOCLogin to Azure using
az login.To create a Azure Redis Cache
Output:
flushallcommand:Another method: