@ Override public void paint ( final RenderContext renderContext ) { // Set headers getResponse ( ) . setHeader ( "Cache-Control" , type . getSettings ( ) ) ; // Add extra no cache headers if ( ! type . isCache ( ) ) { getResponse ( ) . setHeader ( "Pragma" , "no-cache" ) ; getResponse ( ) . setHeader ( "Expires" , "-1" ) ; } super . paint ( renderContext ) ; }
Set the appropriate response headers for caching or not caching the response .