We recently clusterd our Spring application with 2 nodes backed by one database. Our application has Dynamic menu(each user has different menu options), since we dont have enough caching in place every time user logs we hit the database and filter the Menu options based on user security. We want to avoid hitting the database each time user logs in by introducing Cache.
I was reading about hazelcast cache http://hazelcast.org/use-cases/caching/
and I noticed multiple options available for caching like In-Memory Data Grid/NoSql
, Jcache
and Spring Cache
but not really sure which one is the best solution to cache the Menu items(String type). From my understanding I felt Spring Cache
is the correct solution for my use case, if not please suggest me other hazelcast caching options.
Spring Caching supports Hazelcast (or Hazelcast provides integration with Spring Caching
:)
). If you use Spring 4 and higher, you can useJCache
caching support from Spring Framework. You can find examples of usage here. Look forspring-*
projects.Spring Boot also supported. Watch the webinar recording, read my blog post, find code samples here.
Let me know if you have any questions.
Thank you