Is there a way to get Redis to choose the LRU eviction policy (least used) for only certain keys? I want the key set to be constant and never go out of memory. On the other hand, I want another set of keys to be freely evicted if there is little memory.
Redis has an eviction policy that may be good for your case. You can set maxmemory-policy to volatile-lru, which calls Redis:
expire key using LRU algorithm
, , TTL, , , TTL .
, volatile-lru , , , , TTL , , .
Source: https://habr.com/ru/post/1612543/More articles:Не удается создать приложение после перехода на Fabric из Crashlytics - iosYii2 - Unable to find "application \ models \ User" in file: backend / models / User.php. Is there no namespace? - yii2Есть ли политика выведения на основе базы данных в redis, когда ОЗУ заполнена - redisiOS simulator with internet connection - iosHow to calculate the center of multiple polygons in the Javascript Google Maps API? - javascriptHow to define an Android application using a namespace? - namespacesPDFDocument removePageAtIndex: does not work when upgrading to Mac OS X 10.11 - cocoaQT and Crypto ++ c / MTd - c ++Rebuild Crypto ++ 5.6.2 for / MD release in Visual Studio 2013 - c ++Understanding the fitBounds Method on Google Maps - javascriptAll Articles