In one of our project, we are using openshift v3.X to host our spring boot rest services. In the services, we have implemented Guava Cache and we do clear the cache in certain actions.
eg. When user wants the list employees from a table, it returns the all employee list and cache it. Now If any update happens to any employee record, we do clear the cache and reload it.
But we observed that while immediately it gives the updated cache, it gives original old cache in some cases. Suppose, we refresh our UI where we are displaying the records. Does this behavior when there are more than one pods?
Note: We are observing this issue when we use more than one POD for the service. So, do we need to take any special care when we use multiple pods for a service to manage cache?
We use @CacheEvict to clear the clear the Cache.
Any pointers will be much appreciated.
Thanks in Advance.