Overview | Package | Class | Tree | Deprecated | Index | Help
| J2EE1.4 SDK
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sun.appserv.web.cache
Interface CacheHelper

All Known Implementing Classes:
  DefaultCacheHelper

public interface CacheHelper

CacheHelper interface is an user-extensible interface to customize: a) the key generation b) whether to cache the response.

Field Summary
`static java.lang.String` | `ATTR_CACHE_MAPPED_SERVLET_NAME`
`static java.lang.String` | `ATTR_CACHE_MAPPED_URL_PATTERN`
`static int` | `TIMEOUT_VALUE_NOT_SET`

Method Summary
`void` | `destroy()` Stop the helper from active use
`java.lang.String` | `getCacheKey(HttpServletRequest request)` getCacheKey: generate the key to be used to cache this request
`int` | `getTimeout(HttpServletRequest request)` get timeout for the cached response.
`void` | `init(ServletContext context, java.util.Map props)` initialize the helper
`boolean` | `isCacheable(HttpServletRequest request)` isCacheable: is the response to given request cachebale?
`boolean` | `isRefreshNeeded(HttpServletRequest request)` isRefreshNeeded: is the response to given request be refreshed?

Field Detail

### ATTR_CACHE_MAPPED_SERVLET_NAME

    public static final java.lang.String ATTR_CACHE_MAPPED_SERVLET_NAME

See Also:
  Constant Field Values

### ATTR_CACHE_MAPPED_URL_PATTERN

    public static final java.lang.String ATTR_CACHE_MAPPED_URL_PATTERN

See Also:
  Constant Field Values

### TIMEOUT_VALUE_NOT_SET

    public static final int TIMEOUT_VALUE_NOT_SET

See Also:
  Constant Field Values

Method Detail

### init

    public void init(ServletContext context,
                     java.util.Map props)
              throws java.lang.Exception

  initialize the helper

  Parameters:
    `context` - the web application context this helper belongs to
  Throws:
    `java.lang.Exception` - if a startup error occurs

### getCacheKey

    public java.lang.String getCacheKey(HttpServletRequest request)

  getCacheKey: generate the key to be used to cache this request

  Parameters:
    `request` - incoming `HttpServletRequest` object

### isCacheable

    public boolean isCacheable(HttpServletRequest request)

  isCacheable: is the response to given request cachebale?

  Parameters:
    `request` - incoming `HttpServletRequest` object

### isRefreshNeeded

    public boolean isRefreshNeeded(HttpServletRequest request)

  isRefreshNeeded: is the response to given request be refreshed?

  Parameters:
    `request` - incoming `HttpServletRequest` object

### getTimeout

    public int getTimeout(HttpServletRequest request)

  get timeout for the cached response.

  Parameters:
    `request` - incoming `HttpServletRequest` object

### destroy

    public void destroy()
                 throws java.lang.Exception

  Stop the helper from active use

  Throws:
    `java.lang.Exception` - if an error occurs

Overview | Package | Class | Tree | Deprecated | Index | Help
| J2EE1.4 SDK
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Submit a bug or feature

Copyright 2003 Sun Microsystems, Inc. All rights reserved.