(This answer comes ten years after the initial question - but, given that I come across this question in the larger organizations that I consult with, I decided it was useful to explain here.)
When Roy Fielding looked at SOAP , he realized that if HTTP methods (GET, POST , etc.) are used to access and change resources , and not just HTTP for simple remote procedure calls, then other HTTP specifications, such as caching ( RFC-2616 ), may be used. The layered architecture of Fielding illustrates this. That's why he developed REST .
As a proxy server for HTTP caching, Squid is an implementation that can significantly reduce the load on your backend systems, as well as keep cached data up to date.
The standard allows you to determine how long an item can be cached before it is re-checked, and how to make conditional requests, so only new versions are sent in response to a request. All of this client behavior has already been implemented in browsers and in HTTP clients used in major languages ββsuch as the Java Apache HttpComponents Client and the accompanying caching library .
Since all of these mechanisms have been clearly defined and implemented to date, their use is actually only a matter of using these components, most of which you may already be using (for example, at the time of writing, Apache HC Components is the default implementation). that comes with SpringBoot - just add the caching library to the assembly).
If you implemented this with MemCache or Redis , you simply reinvent the wheel and will continue to maintain this custom code ever since. And if you do not implement the RFC 2616 equivalent in your code, you will use legacy data with inefficient communication.
source share