]
Paul Ferraro commented on ISPN-8325:
------------------------------------
[~william.burns] This is more than just a documentation issue. When creating its data
container, Infinispan will create a bounded cache container if size >= 0L [1], which
internally configures Caffeine's maximumSize with the value supplied by size() [2].
Caffeine allows maximumSize(0L), meaning that it will immediately evict entries. [3]
Consequently, if size(0L) is genuinely unsupported, we need to adjust this logic.
[1]
MemoryConfiguration.isEvictionEnabled() returns false if size = 0
-----------------------------------------------------------------
Key: ISPN-8325
URL:
https://issues.jboss.org/browse/ISPN-8325
Project: Infinispan
Issue Type: Bug
Components: Configuration, Eviction
Affects Versions: 9.1.1.Final
Reporter: Paul Ferraro
Priority: Critical
The documentation for MemoryConfiguration explicitly states that eviction is disabled if
size < 0, however, this method returns false if size = 0.
Configuring MemoryConfigurationBuilder with size(0L) causes evict(...) to log a confusing
WARN message:
WARN: ISPN000419: Eviction of an entry invoked without an explicit eviction strategy for
cache foo