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.

What is the difference between the NRU and LRU cache?

cache difference lru nru
0
Posted

What is the difference between the NRU and LRU cache?

0

A. NRU cache works by avoiding passivation as much as possible. Stateful session instances are only passivated when there is memory pressure (your # of beans in the cache approaches the max-beans-in-cache size). This is the ‘NRU’ option in the weblogic-ejb-jar.xml and the default behavior. The LRU cache works by passivating a bean after it reached its idle-timeout-seconds. So if your max-beans-in-cache was 1000 and you only had 10 beans in memory, it would still write the 10 beans to disk after their timeout period expired. This is the ‘LRU’ option in weblogic-ejb-jar.xml. This was added to 5.1 and 6.x because there were some customers that wrote applications depending on the timeout behavior. The was also the default behavior in 3.1-4.5.

Related Questions

What is your question?

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

Experts123