Clarify RequestMappingHandlerAdapter javadoc
This commit updates the javadoc of `RequestMappingHanderAdapter.setCacheSecondsForSessionAttributeHandlers` to explain how one can disable that feature and prevent "Cache-Control" directives from being added when `@SessionAttributes` annotations are used on Controllers. Issue: SPR-13598
This commit is contained in:
parent
84fe46cd43
commit
2b3ad218e5
|
@ -444,10 +444,18 @@ public class RequestMappingHandlerAdapter extends AbstractHandlerMethodAdapter
|
|||
|
||||
/**
|
||||
* Cache content produced by {@code @SessionAttributes} annotated handlers
|
||||
* for the given number of seconds. Default is 0, preventing caching completely.
|
||||
* for the given number of seconds.
|
||||
* <p>Possible values are:
|
||||
* <ul>
|
||||
* <li>-1: no generation of cache-related headers</li>
|
||||
* <li>0 (default value): "Cache-Control: no-store" will prevent caching</li>
|
||||
* <li>> 0: "Cache-Control: max-age=seconds" will ask to cache content; not advised when dealing
|
||||
* with session attributes</li>
|
||||
* </ul>
|
||||
* <p>In contrast to the "cacheSeconds" property which will apply to all general
|
||||
* handlers (but not to {@code @SessionAttributes} annotated handlers),
|
||||
* this setting will apply to {@code @SessionAttributes} handlers only.
|
||||
*
|
||||
* @see #setCacheSeconds
|
||||
* @see org.springframework.web.bind.annotation.SessionAttributes
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue