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

How to clear cache in redis

(*-*)浩
(*-*)浩Original
2019-06-17 11:36:5326926browse

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

2, execute the redis-cli file

#./redis-cli

How to clear cache in redis

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

#flushall

How to clear cache in redis

4, exit the command exit

#exit

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!

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