oracle.jsp.jwcache
Class CacheClientUtil
java.lang.Object
|
+--oracle.jsp.jwcache.CacheClientUtil
- public class CacheClientUtil
- extends java.lang.Object
A utility library class that contains static methods to ease up
user's burden.
Type | Method |
static CachePolicy |
lookupPolicy(javax.servlet.ServletConfig config,
javax.servlet.http.HttpServletRequest request,
java.lang.String policyFile)
A method to lookup and construct a cache policy object from a cache policy file |
static CachePolicy |
refreshPolicy(javax.servlet.ServletConfig config,
javax.servlet.http.HttpServletRequest request,
java.lang.String policyFile)
A method to reload, re-parse and re-construct a cache policy object from a
cache policy file |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
CacheClientUtil
public CacheClientUtil()
lookupPolicy
public static CachePolicy lookupPolicy(javax.servlet.ServletConfig config,
javax.servlet.http.HttpServletRequest request,
java.lang.String policyFile)
throws CachePolicyLoadingException
- A method to lookup and construct a cache policy object from a cache policy file
If the cache policy is already loaded previously either in ocs4j
or
your own servlet context (depends on your cache_policy_in_ocs
configuration), then it will just reuse the existing cache policy object in memory,
instead of reloading and re-parsing the cache policy file. The first loading will
store the cache policy object in memory for later reuse.
- Parameters:
config
- user's current ServletConfig objectrequest
- user's current HttpServletRequest objectpolicyFile
- a string that specifies the URI to the cache policy file; the URI
path is relative to your servlet context;- Returns:
- the loaded cache policy object
refreshPolicy
public static CachePolicy refreshPolicy(javax.servlet.ServletConfig config,
javax.servlet.http.HttpServletRequest request,
java.lang.String policyFile)
throws CachePolicyLoadingException
- A method to reload, re-parse and re-construct a cache policy object from a
cache policy file
No matter whether the cache policy is already loaded previously.
This method will always reload, re-parse and re-construct the cache policy object
from the cache policy file. After reloading, this method will
store the cache policy object in memory for later reuse.
- Parameters:
config
- user's current ServletConfig objectrequest
- user's current HttpServletRequest objectpolicyFile
- a string that specifies the URI to the cache policy file; the URI
path is relative to your servlet context;- Returns:
- the loaded cache policy object