Description of problem: l1-lifespan attribute in distributed cache configuration is not honored. If set to a non-zero value it just sets the underlying cache config parameter, but does not explicitly enable l1 which is by default disabled.
DistributedCacheAdd does: if (lifespan > 0) { builder.clustering().l1().lifespan(lifespan); } This seems to be correct as infinispan docs says: public L1ConfigurationBuilder l1() This method allows configuration of the L1 cache for distributed caches. When this method is called, it automatically enables L1. However, contrary to this the l1() method just returns plain instance of L1ConfigurationBuilder created by empty constructor which default (disabled) value. So it seems to be a bug in infinispan.
The JavaDoc is still incorrect. The default value was changed as part of https://issues.jboss.org/browse/ISPN-1924 (from enabled to disabled by default). In order to enable L1 cache, one has to use l1().enable() and then set the lifespan to a desired value.
For reference, this bug was also reported for JDG by https://issues.jboss.org/browse/ISPN-3867
This should be fixed to work the way it does upstream (in WF8/9) e.g. builder.clustering().l1().enabled(lifespan > 0).lifespan(lifespan)
Not sure where do you see this fixed in upstream? https://github.com/wildfly/wildfly/blob/3754e854ac2e522e41043613cc24cd5fdfd51e49/clustering/infinispan/extension/src/main/java/org/jboss/as/clustering/infinispan/subsystem/DistributedCacheAddHandler.java#L74
PR sent: https://github.com/jbossas/jboss-eap/pull/2420
Proposing for 6.4.x as it blocks workaround for proposed BZ (1015189).
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune with any questions