1 package com.atlassian.core.filters.cache; 2 3 import javax.servlet.http.HttpServletResponse; 4 import javax.servlet.http.HttpServletRequest; 5 6 /** 7 * A strategy for the {@link AbstractCachingFilter}. 8 * <p/> 9 * If an implementation returns true from {@link #matches(HttpServletRequest)}, the filter will call 10 * {@link #setCachingHeaders(HttpServletResponse)} for the strategy to apply the relevant caching headers. 11 * 12 * @see AbstractCachingFilter 13 * @since 4.0 14 */ 15 public interface CachingStrategy 16 { 17 /** 18 * Returns true if the given request should be handled by this caching strategy. 19 */ 20 boolean matches(HttpServletRequest request); 21 22 /** 23 * Sets the relevant caching headers for the response. 24 */ 25 void setCachingHeaders(HttpServletResponse response); 26 }