Sleep caching

I have 2 applications. The first is a web application through which we provide link data. The second is an ESB-based application that uses reference data. The reference data changes, but not very often. We need to cache the data.The link the web application (I am not the owner) uses hibernation. But my ESB-based application did not use. We used only EHCache. When the reference data is modified by an independent web application, which should be reflected in the ESB application. We implemented using the message queue - that is, when the plug-in data changes, the web application sends the message to the message queue. Our ESB application listens for this message and clears the cache and caches the data again. These work. But it takes time. How can I use hibernate to improve the situation?

Regards, Subhendu

+3
source share
2 answers

Not a hibernation problem, from what I see. I would say that this is more about caching. Therefore, I would recommend looking at some distributed caches, especially Infinispan . Thus, both applications can use and manipulate the same cache. If you just use Hibernate, but the caches are still on different machines with different states, then you will encounter the same problem.

+1
source

One solution might be to use EHCache in a Hibernate application, but you say that you have no control over it ...

, , , , ( , ).

0

Source: https://habr.com/ru/post/1784215/