Cache | page
Spring's MVC is a very flexible framework for seamlessly integrating struts/webwork and velocity/tapestry view technologies. Spring's dispatherservlet definition is extremely flexible, because it is an open source framework that allows us to easily customize our processing processes through source code.
In order to achieve page caching, you can rewrite the Dispatherservlet doservice () method, which presents a solution:
Use Wrappedresponse to obtain handler processed content and then cache it so that you can output the cached content directly the next time you request it.
Because caching is implemented at the Dispatherservlet level, either JSP or velocity can work properly.
It is not implemented on the filter layer because filter does not know the context of the request.
We'll discuss in more detail how to implement caching for a particular page in the future.