We are using Hibernate with JPA in a project we are currently developing. Currently running on Wildfly and future possiblity is the commercial version depending on needs.
Some alternatives for the 2nd level cache are listed in the Hibernate documentation here. There also exist other solutions such as Hazelcast. Among alternatives it seems JBoss is officially supporting an Infinispan solution.
As the case in many projects, we have some tables that will rarely change if ever at all, such as a list of cities, the statuses a project can have etc. Hence our decision to use the 2nd level cache for such cases.
- Could you share your expertise in such a scenario? Is this a good usage case? Is there a better way to persist such data? How do you handle data that rarely or never changes?
- Which provider did you use in the past and/or currently using as a 2nd Level Cache and why? What are the pros and cons of the solution you chose?