What does ### Redis have to do with Redisson?

Redisson is an advanced distributed coordination Redis customer service, Can help users in the distributed environment to easily implement some Java objects (Bloom filter, BitSet, Set, SetMultimap, ScoredSortedSet, SortedSet, Map, ConcurrentMap, List, ListMultimap, Queue, BlockingQueue, Deque, BlockingDeque, Semaphore, Lock, ReadWriteLock, AtomicLong, CountDownLatch, Publish/Subscribe, HyperLogLog).

What are the Redis memory flushing strategies?

Redis’s memory flushing strategy refers to how to deal with data that needs to be written and require additional space when Redis has insufficient memory for cache.

1, global key space selective removal

  • Noeviction: New write operations will bug when memory is insufficient to accommodate new write data.
  • Allkeys-lru: Removes the least recently used key from the key space when memory is insufficient to accommodate new writes. (This is the most commonly used)
  • Allkeys-random: Randomly removes a key from the key space when memory is insufficient to accommodate new writes.

2, set the expiration time of the key space selective removal

  • Volatile – lRU: Removes the least recently used key from the expired key space when memory is insufficient to accommodate new writes.
  • Volatile -random: Randomly removes a key from the expired key space when memory is insufficient to accommodate new writes.
  • Volatile – TTL: When the memory is insufficient to accommodate new data, the key whose expiration time is earlier is removed from the key space.