1 23 24 package com.sun.appserv.web.cache; 25 26 import java.util.Map ; 27 28 import javax.servlet.ServletContext ; 29 import javax.servlet.http.HttpServletRequest ; 30 31 34 public interface CacheHelper { 35 36 public static final String ATTR_CACHE_MAPPED_SERVLET_NAME = 38 "com.sun.appserv.web.cachedServletName"; 39 public static final String ATTR_CACHE_MAPPED_URL_PATTERN = 40 "com.sun.appserv.web.cachedURLPattern"; 41 42 public static final int TIMEOUT_VALUE_NOT_SET = -2; 43 44 48 public void init(ServletContext context, Map props) throws Exception ; 49 50 54 public String getCacheKey(HttpServletRequest request); 55 56 61 public boolean isCacheable(HttpServletRequest request); 62 63 69 public boolean isRefreshNeeded(HttpServletRequest request); 70 71 77 public int getTimeout(HttpServletRequest request); 78 79 83 public void destroy() throws Exception ; 84 } 85 | Popular Tags |