Home  >  Article  >  Database  >  Why use redis?

Why use redis?

藏色散人
藏色散人Original
2019-05-21 14:52:1818661browse

Why use redis?

Redis is an open source log-type Key-Value database written in ANSI C language, supports network, can be memory-based and persistent, and provides API in multiple languages. Since March 15, 2010, the development of Redis has been hosted by VMware. Since May 2013, the development of Redis has been sponsored by Pivotal.

Why use redis?

For example, if there are 20 million user information in the system, the user information is basically fixed and rarely changes once entered. Then every time you load all user information, you have to request the database. The database compiles and executes your query statement, which will be much less efficient because this information does not change frequently and the amount of data is large.

In larger cases, the usual approach is to add it to the cache and make a judgment before each fetch. If the cache is not empty, then get the value from the cache. If it is empty, then request the database. , and add data to the cache, which greatly improves system access efficiency.

The above is the detailed content of Why use redis?. 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