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 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-cli
or./redis-cli -h 127.0.0.1 -p 6379
3. Execute the dbsize command
##4. Clear the cache Use the flushall command All caches can be cleared. Example: 5. View all key values Use keys * to verify whether it is empty 6. Execute the exit command to exitNote: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!