June 2018
Intermediate to advanced
280 pages
7h 46m
English
Yet another pattern that may be used to make sure your application is responsive is to implement caching. Caching will make sure that similar types of requests are handled in a faster manner by caching the results. We can implement a cache at different levels, such as the controller level, service-layer level, data-layer level, and so on. We can also implement a cache before the request hits the code; that is, at the server or load-balancer level.
For the sake of this chapter, let's take a very simple example to see how caching helps us to improve performance. Let's take a simple webservice that returns data for an employee:
/*** This method fetches a particular employee data.* @param id* @return* @throws ServletException ...
Read now
Unlock full access