View Javadoc

1   package com.atlassian.cache.servlet.handler;
2   
3   import javax.servlet.http.HttpServletRequest;
4   import javax.servlet.http.HttpServletResponse;
5   
6   /**
7    * Defines an interface that allows you to determine if a cache should be expired or not.
8    */
9   public interface CacheExpirationHandler
10  {
11  
12      /**
13       * Check whether we need to generate a response for this request. Set the necessary headers on the response, and if
14       * we don't need to provide content, set the response status to 304.
15       *
16       * If this method returns true, the caller should not perform any more processing on the request.
17       *
18       * @return true if we don't need to provide any data to satisfy this request
19       */
20      public boolean checkRequest(HttpServletRequest request, HttpServletResponse response);
21  
22      /**
23       * Call this if you want to alert the handler that the content has been modified.
24       */
25      public void modified();
26  
27  }