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

How to clear Redis cache using command line

WBOY
Release: 2023-06-03 16:34:09
forward
3813 people have browsed it

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
Copy after login

2. Clear all caches:

flushall
Copy after login

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!

Related labels:
source:yisu.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template