Understanding Infinispan eviction, expiration and file storage?

Consider the Infinispan cache (version 5.3.0.Final), which has the following properties:

  • Store file
  • Passivation is true.

I am having the following problems understanding the behavior of the cache.

  • Are there two streams for eviction and expiration?
  • When an expiration stream expires, what happens to entries that are in the file but expired? Is this data unloaded into memory and deleted?
  • What is the length of time for these threads?
  • Does file storage file support file for attachment only?
  • Does the file have an index in this version of Infinispan?
  • What exactly is stored in the file in this version of Infinispan? Is it a key or just a value?
+1
source share
1 answer

I will not talk about such an old version, but it is probably the same.

  • Naming is a bit random, TBH. There threadpool with id org.infinispan.executors.eviction with a single default thread that hosts a ScheduledTask that handles expiration. Eviction only starts when you add something to the data container and is processed by a stream that adds a new element.

  • Depends on cache storage implementation - cachestore SPI has a purgeExpired () method that forcibly deletes expired records from the storage. Nothing needs to be loaded into memory.

  • The default is 1 minute. Locate wakeUpInterval (or wakeup period) in the configuration.

  • No, none of the classic file vaults. SoftIndexFileStore uses a similar technique.

  • FileCacheStore has only a few β€œcodes” and is based on a key hash code, SingleFileCacheStore (or KarstenFileCacheStore, depending on your version) has an in-memory index.

  • Both keys and values.

+3
source

Source: https://habr.com/ru/post/1274925/


All Articles