Home  >  Article  >  Database  >  How to clear Redis cache using command line

How to clear Redis cache using command line

WBOY
WBOYforward
2023-06-03 16:34:093765browse

1. Open the command line window

Open "redis-li.exe" in the Redis installation directory.

How to clear Redis cache using command line

2. Authorization

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

How to clear Redis cache using command line

3. Clear the cache

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

How to clear Redis cache using command line

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!

Statement:
This article is reproduced at:yisu.com. If there is any infringement, please contact admin@php.cn delete