Adding "final HttpServletResponse response" as a parameter, then setting the header "Cache-Control" to "all-cache".
Using a Handler Interceptor and using the "postHandle" method provided by it.
Cache headers cannot be set for a specific path.
In an annotation-based Spring MVC controller, which of the following are valid ways to set cache headers for a specific path?
Correct Answer:
Using a Handler Interceptor and using the "postHandle" method provided by it.
Explanation:
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
More Spring MVC MCQ Questions