Package com.atlassian.plugin.servlet
Class ResourceDownloadUtils
java.lang.Object
com.atlassian.plugin.servlet.ResourceDownloadUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddCachingHeaders(jakarta.servlet.http.HttpServletRequest httpServletRequest, jakarta.servlet.http.HttpServletResponse httpServletResponse, String... cacheControls) Set 'expire' headers to cache for one year.static voidaddPrivateCachingHeaders(jakarta.servlet.http.HttpServletRequest httpServletRequest, jakarta.servlet.http.HttpServletResponse httpServletResponse) Sets caching headers with private cache control.static voidaddPublicCachingHeaders(jakarta.servlet.http.HttpServletRequest httpServletRequest, jakarta.servlet.http.HttpServletResponse httpServletResponse) Sets caching headers with public cache control.
-
Constructor Details
-
ResourceDownloadUtils
public ResourceDownloadUtils()
-
-
Method Details
-
addCachingHeaders
public static void addCachingHeaders(jakarta.servlet.http.HttpServletRequest httpServletRequest, jakarta.servlet.http.HttpServletResponse httpServletResponse, String... cacheControls) Set 'expire' headers to cache for one year. Also adds the additional cache control values passed in. Note, this method resets the cache control headers if set previously. If caches are disabled (via the system property atlassian.disable.caches), this method sets 'expires' to 0. -
addPublicCachingHeaders
public static void addPublicCachingHeaders(jakarta.servlet.http.HttpServletRequest httpServletRequest, jakarta.servlet.http.HttpServletResponse httpServletResponse) Sets caching headers with public cache control. Applications should call this method from urlrewrite.xml to decorate urls like/s/{build num}/.../_/resourceurl.- See Also:
-
addPrivateCachingHeaders
public static void addPrivateCachingHeaders(jakarta.servlet.http.HttpServletRequest httpServletRequest, jakarta.servlet.http.HttpServletResponse httpServletResponse) Sets caching headers with private cache control. Applications should call this method from urlrewrite.xml to decorate urls like/sp/{build num}/.../_/resourceurl.- See Also:
-