WebSphere Application Server Version 6.1 Feature Pack for Web Services
             Operating Systems: AIX, HP-UX, i5/OS, Linux, Solaris, Windows, z/OS

             Personalize the table of contents and search results

Dynamic caching with scripting

You can configure dynamic caching with scripting and the wsadmin tool.

Before you begin

Before starting this task, the wsadmin tool must be running. See the Starting the wsadmin scripting client article for more information.

About this task

Important: If you use the wsadmin tool to enable servlet caching, you must make sure that portlet fragment caching is also enabled. Similarly if you use the wsadmin tool to disable servlet caching, you must make sure that portlet fragment caching is also disabled. The settings for these two caching functions must stay synchronized. If you enable or disable servlet caching using the administrative console, synchronization is automatically taken care of for you.

To see a list of parameters associated with dynamic caching, use the attributes command. For example:

$AdminConfig attributes DynamicCache
Perform the following steps to enable servlet caching:

Procedure

  1. Locate the server object. The following example selects the first server found:

    Using Jacl:

    set s1 [$AdminConfig getid /Server:server1/]

    Using Jython:

    s1 = AdminConfig.getid('/Server:server1/')
    
  2. List the web containers and assign them to the wc variable, for example:

    Using Jacl:

    set wc [$AdminConfig list WebContainer $s1]

    Using Jython:

    wc = AdminConfig.list('WebContainer', s1)
  3. Set the enableServletCaching attribute to true and assign it to the serEnable variable, for example:

    Using Jacl:

    set serEnable "{enableServletCaching true}"

    Using Jython:

    serEnable = [['enableServletCaching', 'true']]
  4. Enable caching, for example:

    Using Jacl:

    $AdminConfig modify $wc $serEnable

    Using Jython:

    AdminConfig.modify(wc, serEnable)



In this information ...


IBM Redbooks, demos, education, and more


Use IBM Suggests to retrieve related content from ibm.com and beyond, identified for your convenience.

This feature requires Internet access.

IBM Suggests
Task topic    

Terms of Use | Feedback

Last updated: Nov 25, 2008 2:35:59 AM CST
http://publib.boulder.ibm.com/infocenter/wasinfo/v6r1/index.jsp?topic=/com.ibm.websphere.wsfep.multiplatform.doc/info/ae/ae/txml_caching.html