Class ETagCachingFilter
java.lang.Object
com.atlassian.plugin.servlet.cache.filter.ETagCachingFilter
- All Implemented Interfaces:
jakarta.servlet.Filter
Filter responsible for performing caching of resources.
This filter will cover the following scenarios:
- WHEN If-None-Match matches the ETag generated from a Response body.
- THEN set the ETag header with the current ETag and set Http Status code to 304.
- AND an empty response body.
- WHEN If-None-Match does not match the ETag generated from a response body.
- THEN set the ETag header with the current ETag.
- AND set the response body with the current content.
- Since:
- 4.1.19
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
ETagCachingFilter
public ETagCachingFilter()
-
-
Method Details
-
init
public void init(jakarta.servlet.FilterConfig filterConfig) - Specified by:
initin interfacejakarta.servlet.Filter
-
doFilter
public void doFilter(jakarta.servlet.ServletRequest request, jakarta.servlet.ServletResponse response, jakarta.servlet.FilterChain chain) throws IOException, jakarta.servlet.ServletException - Specified by:
doFilterin interfacejakarta.servlet.Filter- Throws:
IOExceptionjakarta.servlet.ServletException
-
destroy
public void destroy()- Specified by:
destroyin interfacejakarta.servlet.Filter
-