Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to clear the Redis cache in Windows and Linux

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

How do I clean the Redis cache in Windows and Linux? In response to this problem, the editor summed up this article today, hoping to help more friends who want to solve this problem to find a more simple and feasible way.

Windows cleanup method:

Step 1: cd D:\ Program Files\ Redis (enter the installation directory of redis), double-click to run redis-cli.exe

Step 2: execute flushall and flushdb respectively

Linux cleanup method:

1. Visit 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

Redis cluster specifies that key is worth cache cleaning:

1) Log in to the redis server on the specified port

Redis-cli-h 127.0.0.1-p 6379

Where 127.0.0.1 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

This is the end of del key's method of cleaning Redis cache in Windows and Linux. I hope the above content can be of some help and learn more. If you think the article is good, you can share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report