protected void addNoCacheHeaders ( HttpServletResponse response ) { String cacheControlValue = response . getHeader ( WebConstants . HEADER_CACHE_CONTROL ) ; if ( cacheControlValue != null && ! cacheControlValue . isEmpty ( ) ) { cacheControlValue = cacheControlValue + ", " + WebConstants . CACHE_CONTROL_NO_STORE ; } else { cacheControlValue = WebConstants . CACHE_CONTROL_NO_STORE ; } response . setHeader ( WebConstants . HEADER_CACHE_CONTROL , cacheControlValue ) ; response . setHeader ( WebConstants . HEADER_PRAGMA , WebConstants . PRAGMA_NO_CACHE ) ; }
Adds header values to avoid caching of the provided response .