B
B
Bonce2019-08-31 00:05:46
Spring
Bonce, 2019-08-31 00:05:46

How to cache results?

Good afternoon!
Spring boot application, using postgresql, resto messaging
There is a request to a third-party service that runs periodically. I want to achieve the following situation:
the 1st request returned the elements: A, B, C, D; => sent them to the user.
The 2nd query returned elements: A, D, D, E; => sent to the user only D, E.
I.e. the user should receive the difference between the results of the current query and the previous one. But for this you need to store the results of the last query somewhere. I don’t see the point in storing them permanently in the database. you need to constantly overwrite the results.
Please tell me the best practices for solving this problem.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question