Open "redis-li.exe" in the Redis installation directory.
If you operate directly in the opened command line, you will be prompted that you have no permission. You need to use the auth command to authorize first. The usage method is as follows .
auth ‘This is the Redis password
There are two ways to clear the cache: clear the database cache and clear all caches.
1. Clear database cache:
flushdb
2. Clear all caches:
flushall
The above is the detailed content of How to clear Redis cache using command line. For more information, please follow other related articles on the PHP Chinese website!