SunONE Application Server v8.0 PE

Class CacheUtil

  extended bycom.sun.appserv.web.taglibs.cache.CacheUtil

public class CacheUtil
extends java.lang.Object

CacheUtil has utility methods used by the cache tag library.

Constructor Summary
Method Summary
static java.lang.String generateKey(java.lang.String key, PageContext pc)
          This function generates the key to the cache.
static com.sun.appserv.util.cache.Cache getCache(PageContext pc, int scope)
          This is used to get the cache itself.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public CacheUtil()
Method Detail


public static com.sun.appserv.util.cache.Cache getCache(PageContext pc,
                                                        int scope)
This is used to get the cache itself. The cache is stored as an attribute in the specified scope.

the cache object


public static java.lang.String generateKey(java.lang.String key,
                                           PageContext pc)
This function generates the key to the cache. It creates the key by suffixing the servlet path with either the user-specified key or by keeping a counter in the request attribute which it will increment each time so that multiple cache tags in a page each get a unique key.

the generated key

SunONE Application Server v8.0 PE

Submit a bug or feature

Copyright 2003 Sun Microsystems, Inc. All rights reserved.