Home  >  Article  >  Database  >  How to clear redis cache

How to clear redis cache

步履不停
步履不停Original
2019-06-25 13:42:305297browse

How to clear redis cache

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

2.Log in to redis:redis-cli -h 127.0.0.1 -p 6379

3.View all key values:keys *

4.Delete the value of the specified index :del key

5.Clear the entire Redis server data:flushall

6.Clear all keys in the current library: flushdb

REmote DIctionary Server (Redis) is a key-value storage system written by Salvatore Sanfilippo.

Redis is an open source log-type Key-Value database written in ANSI C language, abides by the BSD protocol, supports the network, can be memory-based and persistent, and provides APIs in multiple languages.

It is often called a data structure server because values ​​can be strings, hashes, lists, sets and sorted sets ) and other types.

For more Redis-related technical articles, please visit the Redis Tutorial column to learn!

The above is the detailed content of How to clear redis cache. 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

Related articles

See more