Home  >  Article  >  Database  >  What to do if the redis cache is full

What to do if the redis cache is full

(*-*)浩
(*-*)浩Original
2019-11-22 13:48:343302browse

What to do if the redis cache is full

What should I do if the cache data is full?

First of all, it must be clear that the data used for cache has an expiration time set. , if there is no expiration time, it is not called caching, but it is called persistence.

What should you do if the cache is full?                                                                                                                                                                                               ##What should I do if the cache is full?

##This is the simplest and crudest method, but the cost is relatively high

Memory elimination strategy

Redis’s memory elimination strategy It refers to how to handle data that needs to be newly written and requires additional space to be applied for when the memory used for caching in Redis is insufficient.

maxmemory parameter: Set the maximum memory usage (configuration) maxmemory-policy parameter: The corresponding memory elimination rule (configuration), when the memory is not enough, the memory will be set Elimination rules

#For more Redis-related technical articles, please visit the

Redis database usage tutorialWhat to do if the redis cache is full column to learn!

The above is the detailed content of What to do if the redis cache is full. 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