I have a web application with Spring Boot 2.5.5 and embedded Infinispan 12.1.7. I have a Controller with an endpoint to get a Person object by ID: The following is the PersonService implementation with the use of the @Cacheable annotation on the getPerson method : And here is the Person class: I configured infinispan to use a filesystem-based cache store:
Tag: infinispan
Infinispan : locking in remote transactional cache
We try to use infinispan as a remote cache with a read lock. The clients are making a read with a “put” in order to acquire a lock on the key, like described infinispan documentation in the section pessimistic transactional cache “When cache.put(k1,v1) returns, k1 is locked and no other transaction running anywhere in the cluster can write to it.