使用 Servlet 高速缓存实例
使用此任务配置 Servlet 高速缓存实例。
开始之前
关于此任务
过程
- 启用 Servlet 高速缓存。 有关更多信息,请参阅“配置 Servlet 高速缓存”主题。
- 配置一个或多个高速缓存实例。
- 在管理控制台中,请单击资源 > 高速缓存实例 > Servlet 高速缓存实例。
- 指定高速缓存实例的作用域。 指定单元作用域以使高速缓存实例对于单元内的所有服务器是可用的。节点作用域使高速缓存实例对于节点中的所有服务器是可用的。服务器作用域使高速缓存实例仅对于所选服务器是可用的。如果有必要,您可以合成作用域。注: 您不能使用相同的高速缓存名称或 JNDI 名称在不同的作用域创建高速缓存实例(对象或 Servlet)。
- 单击应用以保存作用域。
- 指定高速缓存实例的设置。 需要名称以及 Java™ 命名和目录接口 (JNDI) 名称字段。JNDI 名称是 cachepec.xml 文件的 <cache-instance> 元素中指定的名称属性。在 cachespec.xml 文件中指定 JNDI 名称的示例如下:
在此示例中,指定 services/cache/instance_one 作为 JNDI 名称。<cache-instance name="services/cache/instance_one">
- 更新您的应用程序。要使用 Servlet 高速缓存实例,您必须指定 <cache-instance> 元素,它具有和此高速缓存实例的 JNDI 名称相同的名称。
子主题
Invalidating entries in a servlet cache
Use this task to invalidate a cache entry from a servlet cache instance.Servlet cache instance collection
A servlet cache instance is a location, in addition to the default shared dynamic cache, where dynamic cache can store, distribute, and share data. By using servlet cache instances, your applications have greater flexibility and better tuning of the cache resources. The Java Naming and Directory Interface (JNDI) name specified for the cache instance is mapped to the name attribute in the <cache-instance> tag in the cachespec.xml configuration file.Servlet 高速缓存实例设置
除了缺省共享的动态高速缓存之外,Servlet 高速缓存实例还是动态高速缓存可以存储、分发和共享数据的位置。使用 Servlet 高速缓存实例,您的应用程序具有更大的灵活性并且能够更好地调整高速缓存资源。为高速缓存实例指定的 Java 命名和目录接口 (JNDI) 名称映射至 cachespec.xml 配置文件的 <cache-instance> 标记中的名称属性。Using the DynamicContentProvider interface for dynamic cache
Use this task to configure the DynamicContentProvider interface for cached servlets and JavaServer Pages (JSP) files.
相关概念:


http://www14.software.ibm.com/webapp/wsbroker/redirect?version=cord&product=was-nd-mp&topic=tdyn_servletcacheinstance
文件名:tdyn_servletcacheinstance.html