22.2.2. L1 Cache Configuration (Remote Client-Server Mode)
The following sample configuration shows the L1 cache default values in Red Hat JBoss Data Grid's Remote Client-Server mode.
<distributed-cache l1-lifespan="${VALUE}"> ... </distributed-cache>
The
l1-lifespan
element is added to a distributed-cache
element to enable L1 caching and to set the life span of the L1 cache entries for the cache. This element is only valid for distributed caches.
If
l1-lifespan
is set to 0
or a negative number (-1
), L1 caching is disabled. L1 caching is enabled when the l1-lifespan
value is greater than 0
.
Note
When the cache is accessed remotely via the Hot Rod protocol, the client accesses the owner node directly. Therefore, using L1 Cache in this situation does not offer any performance improvement and is not recommended. Other remote clients (Memcached, REST) cannot target the owner, therefore, using L1 Cache may increase the performance (at the cost of higher memory consumption).