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

How to clear cache in redis

青灯夜游
青灯夜游 Original
2019-06-11 16:52:18 35597browse

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

2. Execute the redis-cli file

Execute./redis-clior./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!

Statement:
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