Home > Database > Redis > body text

How to clear cache in redis

步履不停
Release: 2019-06-24 11:57:14
Original
2006 people have browsed it

How to clear cache in redis

1. Access the redis root directory cd /usr/local/redis-2.8.19

2. Enter src/redis-cli cd src/redis-cli

3. Execute: dbsize

4. Execute: flushall

5. Execute: exit

****** *************************************************** *******************************************

The specified key in the redis cluster is worth cache cleaning:

1) Log in to the redis server of the specified port
redis-cli -h 127.0.0.1 -p 6379
Among them, 127.0.0.1 It can be written as the IP address of the server, and 6379 is the port number.
2) View all key values ​​
keys *
3) Delete the value of the specified index
del key

For more Redis related technical articles, please visit Redis 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!