Home > Database > Redis > body text

How to clear cache in redis

(*-*)浩
Release: 2019-06-17 11:37:59
Original
26830 people have browsed it

What should I do if the redis cache is full? It’s time to clear the cache. Let’s see how to do it.

How to clear cache in redis

Clear Redis cache under Windows (Recommended learning: Redis video tutorial)

1. Enter the Redis root directory

2. Run redis-cli.exe

3. Execute: dbsize

4. Execute: flushall

5. Execute: exit

Linux system clears the Redis cache

1 and enters the src directory under the directory redis.

#cd redis-2.8.17/src
Copy after login

2, execute the redis-cli file

#./redis-cli
Copy after login

How to clear cache in redis

3, execute the command: flushall, if OK appears, the execution is successful

#flushall
Copy after login

How to clear cache in redis

4, exit the command exit

#exit
Copy after login

For more Redis related technical articles, please visit the Redis database usage tutorial column to learn!

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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!