+

Search Tips   |   Advanced Search

Configuring portlet fragment caching with wsadmin.sh

We can configure portlet fragment caching and wsadmin.sh.

Before starting this task, wsadmin.sh must be running. See the Starting the wsadmin scripting client topic for more information about starting wsadmin.sh.

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

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

    Jacl:

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

    Using Jython:

  2. List the web containers and assign them to the wc variable, for example:

    Jacl:

      set wc [$AdminConfig list PortletContainer $s1]

    Using Jython:

  3. Set the enablePortletCaching attribute to true and assign it to the serEnable variable, for example:

    Jacl:

      set serEnable "{enablePortletCaching true}"

    Using Jython:

      serEnable = [['enablePortletCaching', 'true']]

  4. Enable caching, for example:

    Using Jacl:

      $AdminConfig modify $wc $serEnable

    Using Jython:


Related tasks

  • Configure portlet fragment caching
  • Start the wsadmin scripting client