Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Does JBossCaches implemented LRU eviction policy operates in replication mode?

0
Posted

Does JBossCaches implemented LRU eviction policy operates in replication mode?

0

Yes and no. 🙂 The LRU policy only operates in local mode. That is, nodes that are only evicted locally. This may cause the cache contents not to be synchronized temporarily. But when a user tries to obtain a cache content of an evicted node and finds out that is null (e.g., get returns null), it should get it from other data source and re-populate the data in the cache. During this moment, the node content will be propagated and the cache content will be in sync. However, you still can run eviction policy with cache mode set to either REPL_SYNC or REPL_ASYNC. Depends on your use case, you can set multiple cache instances to have their own eviction policy (of which is operated locally) or just have selected instance with eviction policy activated. Also note that, with cache loader option, an locally evicted node can also be persisted to the backend store and a user can retrieve it from the store later on.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123