protected void processNoCache ( HttpServletRequest request , HttpServletResponse response ) { // // Set the no-cache headers if: // 1) the module is configured for it, or // 2) netui-config.xml has an "always" value for <pageflow-config><prevent-cache>, or // 3) netui-config.xml has an "inDevMode" value for <pageflow-config><prevent-cache>, and we're not in // production mode. // boolean noCache = moduleConfig . getControllerConfig ( ) . getNocache ( ) ; if ( ! noCache ) { PageFlowConfig pfConfig = ConfigUtil . getConfig ( ) . getPageFlowConfig ( ) ; if ( pfConfig != null ) { PreventCache preventCache = pfConfig . getPreventCache ( ) ; if ( preventCache != null ) { switch ( preventCache . getValue ( ) ) { case PreventCache . INT_ALWAYS : noCache = true ; break ; case PreventCache . INT_IN_DEV_MODE : noCache = ! _servletContainerAdapter . isInProductionMode ( ) ; break ; } } } } if ( noCache ) { // // The call to PageFlowPageFilter.preventCache() will cause caching to be prevented // even when we end up forwarding to a page. Normally, no-cache headers are lost // when a server forward occurs. // ServletUtils . preventCache ( response ) ; PageFlowUtils . setPreventCache ( request ) ; } }
Set the no - cache headers . This overrides the base Struts behavior to prevent caching even for the pages .