com.sun.appserv.web.taglibs.cache
Class CacheUtil
java.lang.Object
com.sun.appserv.web.taglibs.cache.CacheUtil
public class CacheUtil
- extends java.lang.Object
CacheUtil has utility methods used by the cache tag library.
|
Method Summary |
static int |
convertScope(java.lang.String scope)
|
static java.lang.String |
generateKey(java.lang.String key,
javax.servlet.jsp.PageContext pc)
This function generates the key to the cache. |
static Cache |
getCache(javax.servlet.jsp.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 |
CacheUtil
public CacheUtil()
getCache
public static Cache getCache(javax.servlet.jsp.PageContext pc,
int scope)
- This is used to get the cache itself. The cache is stored as an
attribute in the specified scope.
- Returns:
- the cache object
generateKey
public static java.lang.String generateKey(java.lang.String key,
javax.servlet.jsp.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.
- Returns:
- the generated key
convertScope
public static int convertScope(java.lang.String scope)
Copyright © 2012 GlassFish Community. All Rights Reserved.