I have this infinispan.xml configuration:
<infinispan>
<cache-container default-cache="dist-sync">
<transport/>
<local-cache name="local">
<expiration lifespan="-1" max-idle="5000" />
</local-cache>
<invalidation-cache name="invalidation" mode="SYNC"/>
<replicated-cache name="repl-sync" mode="SYNC"/>
<distributed-cache name="dist-sync" mode="SYNC"/>
</cache-container>
</infinispan>
How can I instantiate DefaultCacheManager with the cache name configuration local instead of the default cache (dist-sync)
Something like this:
More info in the documentation: https://infinispan.org/docs/stable/titles/configuring/configuring.html#cache_modes
Or javadoc: https://docs.jboss.org/infinispan/11.0/apidocs/org/infinispan/manager/DefaultCacheManager.html#getCache(java.lang.String)
As a side note,
DefaultCacheManager.getCache()returns the cache with name defined in thedefault-cacheattribute (<cache-container default-cache="dist-sync">)