Get the App
SLTechnology News&Howtos  ›  Servers  › 

Redis data elimination strategy

Shulou Source: shulou.com Published: 2022-06-02 19:00:37 10月03日 Update

Redis provides 6 data elimination strategies:

● volatile-ru: select the least recently used data elimination from datasets with an expiration time set

Volatile-lfu: delete the one that is least used for a period of time from the Keys that has been set to expire

● voltil-tt: selects recently expired data from datasets that have been set to expire

● volatile-random: randomly select data elimination from a dataset with an expiration time set

Allkeys-ru: select the least used data from the dataset to be eliminated

● llkeys-Ifu: removes the one that is least used for a period of time from all Keys

● alkeys-random: randomly selecting data from a dataset for elimination

● no-enviction (expulsion): expulsion data is prohibited (no phase-out strategy is used. The default is configured for this), for write

Operation, return error message

Suggestion: after understanding the elimination strategy of Redis, you should take the initiative to set / update the expire time of key when you use it.

Active elimination of inactive old data helps to improve query performance

Tags: Data time policy initiative times selections for this purpose information suggestions performance errors updates queries configuration Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information MySQL vpn Docker NVidia