Reputation: 570
I am trying to build a cache service for my application using spring. Cache needs to be populated from database.
My application runs on three nodes and would like all three nodes to be in sync with the cache. If one node gets an updated value in the cache, it should notify other nodes.
I looked at Spring Cache abstration and it does not talk about caching in cluster environment.
is there a way to propagate cache notifications to other nodes?
Upvotes: 8
Views: 6132
Reputation: 9855
Look at using the Spring memcached plugins for a distributed cache.
https://github.com/jacobhe/spring-boot-tomcat-memcached
Upvotes: 3