com.ibm.websphere.servlet.cache
Interface MetaDataGenerator
- public interface MetaDataGenerator
One MetaDataGenerator will exist for each cacheable servlet
identified in WebSphere. When implementing this interface, be
aware that multiple threads may be using the same MetaDataGenerator
concurrently.
The MetaDataGenerator normally is responsible for
assigning timeout, external cache group, and priority via the appropriate
methods in the entry's FragmentInfo object.
Method Summary |
void |
initialize(CacheConfig cc)
Initialize is called once on servlet initialization, and should
take configuration values from its CacheConfig argurment and
store them locally. |
void |
setMetaData(ServletCacheRequest request,
javax.servlet.http.HttpServletResponse response)
The servlet engine calls this method each time a new cache entry
is created. |
initialize
public void initialize(CacheConfig cc)
- Initialize is called once on servlet initialization, and should
take configuration values from its CacheConfig argurment and
store them locally. Additional config information from user
applications or other sources may be read here as well.
setMetaData
public void setMetaData(ServletCacheRequest request,
javax.servlet.http.HttpServletResponse response)
- The servlet engine calls this method each time a new cache entry
is created. It sets that entry's timeout, and optionally its
priority and any external cache groups it is a member of. To
set these variables, the setMetaData method should call
CacheProxyRequest.getFragmentInfo() to get the
FragmentInfo object associated with
the entry being built. Then use methods like
FragmentInfo.setTimeLimit() to set timeout values according
to your application's needs.