Home > Database > Redis > How to clear cache in redis

How to clear cache in redis

青灯夜游
Release: 2019-06-17 15:39:46
Original
35901 people have browsed it

How to clear cache in redis? The following article will introduce to you how to clear the cache of redis in Linux. I hope it will be helpful to you.

How to clear cache in redis

How to clear the cache of redis in Linux

#1. Enter the src directory under the directory redis.

#cd redis-2.8.17/src
Copy after login

2. Execute the redis-cli file

Execute ./redis-cli or ./redis-cli -h 127.0.0.1 -p 6379

How to clear cache in redis

3. Execute the dbsize command

How to clear cache in redis

##4. Clear the cache

Use the flushall command All caches can be cleared. Example:

How to clear cache in redis

5. View all key values

Use keys * to verify whether it is empty

How to clear cache in redis

6. Execute the exit command to exit

How to clear cache in redis

Note: Redis clearing cache is a very dangerous action and may cause data loss. Operate with caution.

The above is the detailed content of How to clear cache in redis. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
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