How to clear Memcache and redis without restarting the service

Clear Memcache:

# telnet 192.168.100.1 11211
Trying 192.168.100.1…
Connected to 192.168.100.1.
Escape character is ‘^]’.
flush_all
OK
quit
Connection to localhost closed by foreign host.

Clear Redis Cache:

# redis-cli -h 192.168.100.1
192.168.100.1:6379 > flushall
OK