Help with using Infinispan - caching simple data

I’m looking into the docs but I can’t come up with an easy way to retrieve and store simple data within a cluster of apps running Infinispan.

I’d like to store a simple String and key-value pair data - and retrieve the same, and ideally there wouldn’t be any NIO (remote gets) if the get is running on the same node where the cache entry is stored.

I’m not sure how replication runs on Infinispan ie. does it store data replicas on all nodes or just some nodes.

I’m particularly using Keycloak in HA, which internally runs a cluster of infinispan nodes.

Can this be achieved out of the box?

Originally posted on Help with using Infinispan - caching simple data · Discussion #13187 · keycloak/keycloak · GitHub