What should I do if the redis cache is full? It’s time to clear the cache. Let’s see how to do it.
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
3, execute the command: flushall, if OK appears, the execution is successful
#flushall
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!